Structural relaxation in a Sr2CrReO6 epitaxial film, which exhibits strong spin-orbit coupling, leads to depth-dependent magnetism. We combine two depth-resolved synchrotron x-ray techniques, two-dimensional reciprocal space mapping and x-ray magnetic circular dichroism, to quantitatively determine this effect. An 800 nm thick film of Sr2CrReO6, grown with tensile epitaxial strain on SrCr0.5Nb0.5O3(225 nm)/LSAT, relaxes away from the Sr2CrReO6/SrCr0.5Nb0.5O3 interface to its bulk lattice parameters, with much of the film being fully relaxed. Grazing incidence xray diffraction measurements of the film elucidate the in-plane strain relaxation near the filmsubstrate interface while depth-resolved x-ray magnetic circular dichroism at the Re L edge reveals the magnetic contributions of the Re site. The smooth relaxation of the film near the interface correlates with changes in the magnetic anisotropy. This provides a systematic and powerful way to probe the depth-varying structural and magnetic properties of a complex oxide with synchrotronsource x-ray techniques.