Cyclic di-GMP and cyclic di-AMP are second messengers produced by a wide variety of bacteria. They influence bacterial cell survival, biofilm formation, virulence and bacteria-host interactions. However, many of their cellular targets and biological effects are yet to be determined. A chemical proteomics approach revealed that Mycobacterium smegmatis RecA (MsRecA) possesses a high-affinity cyclic di-AMP binding activity. We further demonstrate that both cyclic di-AMP and cyclic di-GMP bind specifically to the C-terminal motif of MsRecA and Mycobacterium tuberculosis RecA (MtRecA). Escherichia coli RecA (EcRecA) was devoid of cyclic di-AMP binding but have cyclic di-GMP binding activity. Notably, cyclic di-AMP attenuates the DNA strand exchange promoted by MsRecA as well as MtRecA through the disassembly of RecA nucleoprotein filaments. However, the structure and DNA strand exchange activity of EcRecA nucleoprotein filaments remain largely unaffected. Furthermore, M. smegmatis ΔdisA cells were found to have undetectable RecA levels due to the translational repression of recA mRNA. Consequently, the ΔdisA mutant exhibited enhanced sensitivity to DNA-damaging agents. Altogether, this study points out the importance of sequence diversity among recA genes, the role(s) of cyclic di-AMP and reveals a new mode of negative regulation of recA gene expression, DNA repair and homologous recombination in mycobacteria.