Many bacterial pathogens cause persistent infections despite repeated antibiotic exposure. Bacterial persisters are antibiotic-tolerant cells, but little is known about their growth status and the signals and pathways leading to their formation in infected tissues. We used fluorescent single-cell analysis to identify Salmonella persisters during infection. These were part of a nonreplicating population formed immediately after uptake by macrophages and were induced by vacuolar acidification and nutritional deprivation, conditions that also induce Salmonella virulence gene expression. The majority of 14 toxin-antitoxin modules contributed to intracellular persister formation. Some persisters resumed intracellular growth after phagocytosis by naïve macrophages. Thus, the vacuolar environment induces phenotypic heterogeneity, leading to either bacterial replication or the formation of nonreplicating persisters that could provide a reservoir for relapsing infection.