Autophagy is a homeostatic process with multiple functions in mammalian cells. Here, we show that mammalian Atg8 proteins (mAtg8s) and the autophagy regulator IRGM control TFEB, a transcriptional activator of the lysosomal system. IRGM directly interacted with TFEB and promoted the nuclear translocation of TFEB. An mAtg8 partner of IRGM, GABARAP, interacted with TFEB. Deletion of all mAtg8s or GABARAPs affected the global transcriptional response to starvation and downregulated subsets of TFEB targets. IRGM and GABARAPs countered the action of mTOR as a negative regulator of TFEB. This was suppressed by constitutively active RagB, an activator of mTOR. Infection of macrophages with the membrane-permeabilizing microbe Mycobacterium tuberculosis or infection of target cells by HIV elicited TFEB activation in an IRGM-dependent manner. Thus, IRGM and its interactors mAtg8s close a loop between the autophagosomal pathway and the control of lysosomal biogenesis by TFEB, thus ensuring coordinated activation of the two systems that eventually merge during autophagy.