Bacterial infections, including Bacillus anthracis (anthrax), are a common risk associated with illicit drug use, particularly among injecting drug users. There is, therefore, an urgent need to survey illicit drugs used for injection for the presence of bacteria and provide valuable information to health and forensic authorities. The objectives of this study were to develop a method for the extraction of bacterial DNA from illicit drugs and conduct a metagenomic survey of heroin and methamphetamine seized in the Australian Capital Territory during 2002-2011 for the presence of pathogens. Trends or patterns in drug contamination and their health implications for injecting drug users were also investigated.Methods based on the ChargeSwitch ®gDNA mini kit (Invitrogen), QIAamp DNA extraction mini kit (QIAGEN) with and without bead-beating, and an organic phenol/chloroform extraction with ethanol precipitation were assessed for the recovery efficiency of both free and cellular bacterial DNA. Bacteria were identified using polymerase chain reaction and electrospray ionization-mass spectrometry (PCR/ESI-MS).An isopropanol pre-wash to remove traces of the drug and diluents, followed by a modified ChargeSwitch ® method, was found to efficiently lyse cells and extract free and cellular DNA from Gram-positive and Gram-negative bacteria in heroin and methamphetamine which could then be identified by PCR/ESI-MS. Analysis of 12 heroin samples revealed the presence of DNA from species of Comamonas, Weissella, Bacillus, Streptococcus and Arthrobacter. No organisms were detected in the nine methamphetamine samples analysed.This study develops a method to extract and identify Gram-positive and Gram-negative bacteria from illicit drugs and demonstrates the presence of a range of bacterial pathogens in seized drug samples. These results will prove valuable for future work investigating trends or patterns in drug contamination and their health implications for injecting drug users as well as enabling forensic links between seizures to be examined.