A recently developed multi-functional phosphotriazine-based polymer is used as a matrix for embedding γ-Fe2O3 nanoparticles as well as a suitable chemical template for surface modification with silver nanoparticles. For the primary magnetic modification, maghemite nanoparticles are surface modified with oleic acid in order to render them organophilic and to prevent the aggregation of the nanoparticles. This aggregation could occur as the polymer synthesis, based on reaction of phosphonitrilic chlorine and 1,4-phenylenediamine, takes place in toluene. The surface active amine units of the polymer structure enable the reduction of silver cations to silver nanoparticles, which are well attached and finely dispersed on its surface. The developed nanocomposite represents one of the few magnetically controllable antibacterial agents based on silver nanoparticles. Magnetic measurements reveal the completely suppressed interactions among maghemite nanoparticles because of their perfect surface coating with an organic surfactant and fine dispersion inside the polymer matrix. This magnetic nanocomposite exhibits a high antibacterial and antifungal activity as proven by tests with nine bacterial strains and four candida (yeast genus) species. For the majority of the tested species, the minimum-inhibition concentrations are below 100 mg L−1, which is comparable to their equivalent minimum-inhibition concentrations in colloidal silver systems.