Trehalose [alpha-D-glucopyranosyl-(1→1)-alpha- D-glucopyranoside] is a highly abundant disaccharide in mycobacteria that fulfills many biological roles and has a plethora of possible metabolic fates. Trehalose is synthesized in mycobacteria de novo either from glycolytic intermediates or from alpha-glucans via two alternative routes, the OtsA-OtsB and the TreY-TreZ pathways, respectively. Intracellular trehalose can serve as an endogenous remobilizable carbon storage compound and as a biocompatible stress protectant. Furthermore, trehalose functions as the sugar core of many glycolipids with important structural or immunomodulatory functions such as the cord factor trehalose dimycolate, sulfolipids, and polyacyltrehalose. Moreover, trehalose plays a central role in the formation of the mycolic acid cell wall layer because it serves as a carrier molecule that shuttles mycolic acids in the form of the glycolipid trehalose monomycolate between the cytoplasm and the periplasm. In this process, a specific importer recycles the free trehalose that is extracellularly released as a by-product during mycolate processing via the antigen 85 complex, which might represent a specific adaptation to the intracellular lifestyle of Mycobacterium tuberculosis with limited carbohydrate availability. Finally, trehalose is converted to glycogen-like branched alpha-glucans by a four-step metabolic pathway involving the essential maltosyltransferase GlgE, which may be further processed to derivatives with intracellular or extracellular destinations such as polymethylated lipopolysaccharides or capsular alpha-glucans, respectively. In this article we summarize the current knowledge of the genetic basis of trehalose biosynthesis and metabolism in mycobacteria, the biological functions of trehalose-based molecules, and their roles in virulence of the human pathogen M. tuberculosis.