Granulomas are organized host immune structures composed of tightly interposed macrophages and other cells that form in response to a variety of persistent stimuli, both infectious and noninfectious. The tuberculous granuloma is essential for host containment of mycobacterial infection, although it does not always eradicate it. Therefore, it is considered a host-beneficial, if incompletely efficacious, immune response. The Mycobacterium RD1 locus encodes a specialized secretion system that promotes mycobacterial virulence by an unknown mechanism. Using transparent zebrafish embryos to monitor the infection process in real time, we found that RD1-deficient bacteria fail to elicit efficient granuloma formation despite their ability to grow inside of infected macrophages. We showed that macrophages infected with virulent mycobacteria produce an RD1-dependent signal that directs macrophages to aggregate into granulomas. This Mycobacterium-induced macrophage aggregation in turn is tightly linked to intercellular bacterial dissemination and increased bacterial numbers. Thus, mycobacteria co-opt host granulomas for their virulence.