Although small molecules shed from pathogens are widely used to diagnose infection, such tests have not been widely implemented for tuberculosis. Here we show that the recently identified compound, 1-tuberculosinyladenosine (1-TbAd), accumulates to comprise >1% of all Mycobacterium tuberculosis lipid. In vitro and in vivo, two isomers of TbAd were detected that might serve as infection markers. Using mass spectrometry and nuclear magnetic resonance, we established the structure of the previously unknown molecule, N6-tuberculosinyladenosine (N6-TbAd). Its biosynthesis involves enzymatic production of 1-TbAd by Rv3378c followed by conversion to N6-TbAd via the Dimroth rearrangement. Intact biosynthetic genes are observed only within M. tuberculosiscomplex bacteria, and TbAd was not detected among other medically important pathogens, environmental bacteria, and vaccine strains. With no substantially similar known molecules in nature, the discovery and in vivo detection of two abundant terpene nucleosides support their development as specific diagnostic markers of tuberculosis.