Measuring how the magnetic correlations evolve in doped Mott insulators has greatly improved our understanding of the pseudogap, non-Fermi liquids and high-temperature superconductivity(1-4). Recently, photo-excitation has been used to induce similarly exotic states transiently(5-7). However, the lack of available probes of magnetic correlations in the time domain hinders our understanding of these photo-induced states and how they could be controlled. Here, we implement magnetic resonant inelastic X-ray scattering at a free-electron laser to directly determine the magnetic dynamics after photo-doping the Mott insulator Sr2IrO4. We find that the non-equilibrium state, 2 ps after the excitation, exhibits strongly suppressed long-range magnetic order, but hosts photo-carriers that induce strong, non-thermal magnetic correlations. These two-dimensional (2D) in-plane Neel correlations recover within a few picoseconds, whereas the three-dimensional (3D) long-range magnetic order restores on a fluence-dependent timescale of a few hundred picoseconds. The marked difference in these two timescales implies that the dimensionality of magnetic correlations is vital for our understanding of ultrafast magnetic dynamics.