Understanding magnetocrystalline anisotropy (MCA) is fundamentally important for developing novel magnetic materials. Therefore, clarifying the relationship between MCA and local physical quantities observed by spectroscopic measurements, such as the orbital and quadrupole moments, is necessary. In this review, we discuss MCA and the distortion effects in magnetic materials with transition metals (TMs) based on the orbital and quadrupole moments, which are related to the spin-conserving and spin-flip terms in the second-order perturbation calculations, respectively. We revealed that orbital moment stabilized the spin moment in the direction of the larger orbital moment, while the quadrupole moment stabilized the spin moment along the longitudinal direction of the spin-density distribution. The MCA of the magnetic materials with TMs and their interfaces can be determined from the competition between these two contributions. We showed that the perpendicular MCA of the facecentered cubic (fcc) Ni with tensile tetragonal distortion arose from the orbital moment anisotropy, whereas that of Mn-Ga alloys originated from the quadrupole moment of spin density. In contrast, in the Co/Pd(111) multilayer and Fe/MgO(001), both the orbital moment anisotropy and quadrupole moment of spin density at the interfaces contributed to the perpendicular MCA. Understanding the MCA of magnetic materials and interfaces based on orbital and quadrupole moments is essential to design MCA of novel magnetic applications.