Highly anisotropic face-centered-tetragonal (fct) CoPt and fct FePt nanoparticles have been prepared and embedded in a C or BN matrix by cosputtering from pure Co50Pt50, BN, and Fe50Pt50, C solid targets using a tandem deposition mode. The as-made films show a disordered face-centered-cubic structure which is magnetically soft and have low coercivity (≪20 Oe). Magnetic hardening occurs after heat treatment at elevated temperatures, which leads to increase in coercivity to values up to 15 kOe at room temperature. The hardening is due to the formation of nanoparticles with the highly anisotropic fct with anisotropy K≫107 erg/cm3. Transmission electron microscope studies showed FePt particles embedded in C matrix with a size increasing from below 3 nm in the as-made state to about 8 nm in the optimum annealed state. These results are very promising and make these materials potential candidates for high-density magnetic recording. © 2000 American Institute of Physics.