With the rapid advancements in wireless communication and radar detection technologies, there has been a significant uptick in the utilization frequency of electromagnetic waves across both civilian and military sectors, consequently generating substantial electromagnetic radiation and interference. These electromagnetic pollutants present a considerable threat to public health and information security. Consequently, materials capable of absorbing and mitigating electromagnetic pollution have garnered significant attention.The nanomaterials with multiple components and various heterogeneous interfaces have been considered as preferred efficient electromagnetic wave (EMW) absorbers. In this work, carbon nanofibers doped with magnetic metal oxide particles (Co/Ni-CNFs) are prepared by electrospinning and heat treatment. In these samples, the minimum reflection loss can reach -40.13dB at 4.6mm, and the widest effective absorption bandwidth is 4.4GHz. The excellent microwave absorption is attributed to the appropriate impedance matching. The electromagnetic parameters of Co/Ni-CNFs are balanced by adjusting the concentration of magnetic metal-organic framework material (MOFs) in the precursor solution. It is believed that this work can provide a reference for developing lightweight, flexible, and robust electromagnetic wave-absorbing materials.