The origin of perpendicular magnetic anisotropy (PMA) in amorphous Nd x Co 1−x thin films is investigated using x-ray magnetic circular dichroism (XMCD) spectroscopy at the Co L 2,3 and Nd M 4,5 edges. The magnetic orbital and spin moments of the 3d cobalt and 4f neodymium electrons were measured as a function of the magnetic field orientation, neodymium concentration, and temperature. In all the studied samples, the magnetic anisotropy of the neodymium subnetwork is always oriented perpendicular to the plane, whereas the anisotropy of the orbital moment of cobalt is in the basal plane. The ratio L z /S z of the neodymium 4f orbitals changes with the sample orientation angle, being higher and closer to the atomic expected value at normal orientation and smaller at grazing angles. This result is well explained by assuming that the 4f orbital is distorted by the effect of an anisotropic crystal field when it is magnetized along its hard axis, clearly indicating that the 4f states are not rotationally invariant. The magnetic anisotropy energy associated to the neodymium subnetwork should be proportional to this distortion, which we demonstrate is accessible by applying the XMCD sum rules for the spin and intensity at the Nd M 4,5 edges. The analysis unveils a significant portion of neodymium atoms magnetically uncoupled to cobalt, i.e., paramagnetic, confirming the inhomogeneity of the films and the presence of a highly disordered neodymium rich phase already detected by extended x-ray-absorption fine structure (EXAFS) spectroscopy. The presence of these inhomogeneities is inherent to the evaporation preparation method when the chosen concentration in the alloy is far from its eutectic concentrations. An interesting consequence of the particular way in which cobalt and neodymium segregates in this system is the enhancement of the cobalt spin moment which reaches 1.95 μ B in the sample with the largest segregation.