We report a time-resolved study of the ultrafast dynamics of the magnetic moments formed by the [Formula: see text] states in Sr2IrO4 by directly probing the localized iridium 5d magnetic state through resonant x-ray diffraction. Using optical pump-hard x-ray probe measurements, two relaxation time scales were determined: a fast fluence-independent relaxation is found to take place on a time scale of 1.5 ps, followed by a slower relaxation on a time scale of 500 ps-1.5 ns.