We have performed a systematic study on the correlation between magnetic anisotropy energy (MAE) and crystal structures, such as lattice parameters, stacking fault densities, lattice strain, and so on, for epitaxially grown Co, Co-Pt, and Co-Pd alloy thin films, and have found that the MAE strongly depends on the axial ratio c/a of the hcp crystal lattice. As the c/a of hcp Co decreases down to ∼1.61 which is smaller than 1.622 for bulk Co, the MAE becomes significantly enhanced up to ∼10(6) J m(-3). Similar trends have also been verified for hcp Co-Pt and -Pd. These results, which are qualitatively consistent with the classic single-ion anisotropy model and the recent first principles calculation, suggest a new effective way to control the MAE of magnetic thin films.