Magnetocrystalline anisotropy (MCA) in doped Ce 2 Co 17 and other competing structures was investigated using density functional theory. We confirmed that the MCA contribution from dumbbell Co sites is very negative. Replacing Co dumbbell atoms with a pair of Fe or Mn atoms greatly enhance the uniaxial anisotropy, which agrees quantitatively with experiment, and this enhancement arises from electronic-structure features near the Fermi level, mostly associated with dumbbell sites. With Co dumbbell atoms replaced by other elements, the variation of anisotropy is generally a collective effect and contributions from other sublattices may change significantly. Moreover, we found that Zr doping promotes the formation of 1-5 structure that exhibits a large uniaxial anisotropy, such that Zr is the most effective element to enhance MCA in this system.