Extracellular DNA (eDNA) is an integral biofilm matrix component of numerous pathogens, including nontuberculous mycobacteria (NTM). Cell lysis is the source of eDNA in certain bacteria, but the source of eDNA remains unidentified for NTM, as well as for other eDNA-containing bacterial species. In this study, conditions affecting eDNA export were examined, and genes involved with the eDNA export mechanism were identified. After a method for monitoring eDNA in real time in undisturbed biofilms was established, different conditions affecting eDNA were investigated. Bicarbonate positively influenced eDNA export in a pH-independent manner in Mycobacterium avium, M. abscessus, and M. chelonae. The surface-exposed proteome of M. avium in eDNA-containing biofilms revealed abundant carbonic anhydrases. Chemical inhibition of carbonic anhydrases with ethoxzolamide significantly reduced eDNA export. An unbiased transposon mutant library screen for eDNA export in M. avium identified many severely eDNA-attenuated mutants, including one not expressing a unique FtsK/SpoIIIE-like DNA-transporting pore, two with inactivation of carbonic anhydrases, and nine with inactivation of genes belonging to a unique genomic region, as well as numerous mutants involved in metabolism and energy production. Complementation of nine mutants that included the FtsK/SpoIIIE and carbonic anhydrase significantly restored eDNA export. Interestingly, several attenuated eDNA mutants have mutations in genes encoding proteins that were found with the surface proteomics, and many more mutations are localized in operons potentially encoding surface proteins. Collectively, our data strengthen the evidence of eDNA export being an active mechanism that is activated by the bacterium responding to bicarbonate.