Atomic arrangements in the mixed valence oxide U3O7 are refined from high-resolution neutron scattering data. The crystallographic model describes long-range structural order in a U60O140 primitive cell (space group P42/n) containing distorted cuboctahedral oxygen clusters. By combining experimental data and electronic structure calculations accounting for spin-orbit interactions, we provide robust evidence of an interplay between charge localization and the magnetic moments carried by the uranium atoms. The calculations predict U3O7 to be a semiconducting solid with a band gap of close to 0.32 eV, and a more pronounced charge-transfer insulator behavior as compared to the well-known Mott insulator UO2. Most uranium ions (56 out of 60) occur in nine-fold and ten-fold coordinated environments, surrounding the oxygen clusters, and have a tetravalent (24 out of 60) or pentavalent (32 out of 60) state. The remaining uranium ions (4 out of 60) are not contiguous to the oxygen cuboctahedra, and have a very compact, eight-fold coordinated environment with two short (2 × 1.93(3) Å) “oxo-type” bonds. The higher Hirshfeld charge and the diamagnetic character point to a hexavalent state for these four uranium ions. Hence, the valence state distribution corresponds to 24/60 × U(IV) + 32/60 U(V) + 4/60 U(VI). The tetravalent and pentavalent uranium ions are predicted to carry non-collinear magnetic moments (with amplitudes of 1.6 µB and 0.8 µB, respectively), resulting in canted ferromagnetic order in characteristic layers within the overall fluorite-related structure.