In this work, the effect of the molar ratio of (Ni2+and Fe3+) on the properties of CdO–NiO–Fe2O3nanocomposites was investigated. The synthesis of CdO–NiO–Fe2O3nanocomposites was carried out by self-combustion. XRD, UV–Vis, PL and VSM were used to describe the physical properties of the materials. The results showed significant progress in structural and optical properties supporting antibacterial activity. For all samples, the particle size decreased from 28.96 to 24.95 nm with increasing Ni2+content and decreasing Fe3+content, as shown by the XRD pattern, which also shows the crystal structure of cubic CdO, cubic NiO, and cubic γ-Fe2O3spinel. The Ni2+and Fe3+contents in the CdO–NiO–Fe2O3nanocomposites have also been shown to enhance the ferromagnetic properties. Due to the significant coupling between Fe2O3and NiO, the coercivity Hcvalues of the samples increase from 66.4 to 266 Oe. The potential of the nanocomposites for antibacterial activity was investigated against Gram-positive (Staphylococcus aureus) and Gram-negative (Pseudomonas aeruginosa,Escherichia coli, andMoraxella catarrhalis) bacteria. Comparison ofP. aeruginosawithE. coli,S. aureusandM. catarrhalisshowed that it has a stronger antibacterial activity with a ZOI of 25 mm.