The choice of effective biocides used for routine hospital practice should consider the role of disinfectants in the maintenance and development of local resistome and how they might affect antibiotic resistance gene transfer within the hospital microbial population. Currently, there is little understanding of how different biocides contribute to eDNA release that may contribute to gene transfer and subsequent environmental retention. Here, we investigated how different biocides affect the release of eDNA from mature biofilms of two opportunistic model strains Pseudomonas aeruginosa ATCC 27853 (PA) and Staphylococcus aureus ATCC 25923 (SA) and contribute to the hospital resistome in the form of surface and water contaminants and dust particles. The effect of four groups of biocides, alcohols, hydrogen peroxide, quaternary ammonium compounds, and the polymeric biocide polyhexamethylene guanidine hydrochloride (PHMG-Cl), was evaluated using PA and SA biofilms. Most biocides, except for PHMG-Cl and 70% ethanol, caused substantial eDNA release, and PHMG-Cl was found to block biofilm development when used at concentrations of 0.5% and 0.1%. This might be associated with the formation of DNA–PHMG-Cl complexes as PHMG-Cl is predicted to bind to AT base pairs by molecular docking assays. PHMG-Cl was found to bind high-molecular DNA and plasmid DNA and continued to inactivate DNA on surfaces even after 4 weeks. PHMG-Cl also effectively inactivated biofilm-associated antibiotic resistance gene eDNA released by a pan-drug-resistant Klebsiella strain, which demonstrates the potential of a polymeric biocide as a new surface-active agent to combat the spread of antibiotic resistance in hospital settings.