Because of their magnetic properties, magnetic nanoparticles (MNPs) have numerous diverse biomedical applications. In addition, because of their ability to penetrate bacteria and biofilms, nanoantimicrobial agents have become increasingly popular for the control of infectious diseases. Here, MNPs were prepared through an iron salt coprecipitation method in an alkaline medium, followed by a chitosan coating step (CS-coated MNPs); finally, the MNPs were loaded with ampicillin (amp) to form an amp-CS-MNP nanocomposite. Both the MNPs and amp-CS-MNPs were subsequently characterized and evaluated for their antibacterial activity. X-ray diffraction results showed that the MNPs and nanocomposites were composed of pure magnetite. Fourier transform infrared spectra and thermogravimetric data for the MNPs, CS-coated MNPs, and amp-CS-MNP nanocomposite were compared, which confirmed the CS coating on the MNPs and the amp-loaded nanocomposite. Magnetization curves showed that both the MNPs and the amp-CS-MNP nanocomposites were superparamagnetic, with saturation magnetizations at 80.1 and 26.6 emu g
−1
, respectively. Amp was loaded at 8.3%. Drug release was also studied, and the total release equilibrium for amp from the amp-CS-MNPs was 100% over 400 minutes. In addition, the antimicrobial activity of the amp-CS-MNP nanocomposite was determined using agar diffusion and growth inhibition assays against Gram-positive bacteria and Gram-negative bacteria, as well as
Candida albicans
. The minimum inhibitory concentration of the amp-CS-MNP nanocomposite was determined against bacteria including
Mycobacterium tuberculosis
. The synthesized nanocomposites exhibited antibacterial and antifungal properties, as well as antimycobacterial effects. Thus, this study introduces a novel β-lactam antibacterial-based nanocomposite that can decrease fungus activity on demand for numerous medical applications.