The CoFe2O4 magnetic nanoparticles were dealt with nitric acid to form an ionization surface and improve the dispersion property of CoFe2O4 nanoparticles greatly, then the polyaniline/CoFe2O4 (PANI/CoFe2O4) electromagnetic nanocomposites were synthesized by an in-situ polymerization method. The morphologies, structure, thermal stability, and electro-magnetic property of the PANI/CoFe2O4 nanocomposites were characterized by TEM, XRD, FT-IR, TG, four-probe and VSM techniques. The results indicated that well-dispersed PANI/CoFe2O4 nanocomposites were prepared by the in-situ polymerization of monomer An on the surface of treated CoFe2O4 nanoparticles and the magnetic nanoparticles with diameters of about 25 nm were dispersed in the base of PANI. The thermal stability of the PANI/CoFe2O4 nanocomposites was remarkably improved, due to formation of the bonding interaction between the CoFe2O4 and polyaniline in the composites. And the electro-magnetic properties of the nanocomposites changed with the content of the CoFe2O4.