Angle-dependent x-ray magnetic circular dichroism (XMCD) experiments performed at both the Co and Pt L2,3 edges for a cubic CoPt3 thin film, which exhibits growth-induced chemical anisotropy, are used to determine the element specific magnetic anisotropy. The large decrease of the 3d orbital moment, observed when the spins are forced out the easy axis of magnetization by the applied magnetic field, is a consequence of a strong magnetocrystalline anisotropy (MCA). In addition, a weak but systematic variation of the Pt orbital moment indicates that the 5d atoms could play an important role in the MCA. These results correlate the microscopic XMCD evaluation of the MCA and the local structural anisotropy as observed with x-ray absorption fine structure (XAFS).