Polyaniline/Fe3O4 nanoparticle composite was prepared by polymerizing aniline in the presence of Fe3O4 nanoparticles upon the use of H2O2 as oxidant. The polymerization was monitored by ultraviolet-visible absorption spectroscopy. The microstructure of the resultant composite was characterized by transmission electron microscopy. The molecular structure of the resultant polyaniline in the composite was investigated by both Fourier transform infrared spectroscopy and X-ray photoelectron spectroscopy, while the magnetic property of the composite was characterized by vibrating sample magnetometer. Furthermore, the microwave absorption property of the resultant composite was measured in a frequency range of 2-18 GHz. Systematic investigations revealed that carboxylic acid in the buffer presented a determined role in the polymerization of aniline. To discover the role of carboxylic acid in the polymerization of aniline, more control experiments were designed and carried out by theoretical calculation in combination with electron spin resonance measurements. It was for the first time found out that carboxylic acid such as acetic acid and succinic acid can not only catalyze the polymerization of aniline but also facilitate the generation of hydroxyl radical via the decomposition of H2O2.