Magnetic nanofibers are of great interest in basic research, as well as for possible applications in spintronics and neuromorphic computing. Here we report on the preparation of magnetic nanofiber mats by electrospinning polyacrylonitrile (PAN)/nanoparticle solutions, creating a network of arbitrarily oriented nanofibers with a high aspect ratio. Since PAN is a typical precursor for carbon, the magnetic nanofiber mats were stabilized and carbonized after electrospinning. The magnetic properties of nanofiber mats containing magnetite or nickel ferrite nanoparticles were found to depend on the nanoparticle diameters and the potential after-treatment, as compared with raw nanofiber mats. Micromagnetic simulations underlined the different properties of both magnetic materials. Atomic force microscopy and scanning electron microscopy images revealed nearly unchanged morphologies after stabilization without mechanical fixation, which is in strong contrast to pure PAN nanofiber mats. While carbonization at 500 °C left the morphology unaltered, as compared with the stabilized samples, stronger connections between adjacent fibers were formed during carbonization at 800 °C, which may be supportive of magnetic data transmission.