Live attenuated vaccines are generally highly efficacious and often superior to inactivated vaccines, yet the underlying mechanisms of this remain largely unclear. Here we identify recognition of microbial viability as a potent stimulus for follicular helper T cell (TFH cell) differentiation and vaccine responses. Antigen-presenting cells (APCs) distinguished viable bacteria from dead bacteria through Toll-like receptor 8 (TLR8)-dependent detection of bacterial RNA. In contrast to dead bacteria and other TLR ligands, live bacteria, bacterial RNA and synthetic TLR8 agonists induced a specific cytokine profile in human and porcine APCs, thereby promoting TFH cell differentiation. In domestic pigs, immunization with a live bacterial vaccine induced robust TFH cell and antibody responses, but immunization with its heat-killed counterpart did not. Finally, a hypermorphic TLR8 polymorphism was associated with protective immunity elicited by vaccination with bacillus Calmette-Guérin (BCG) in a human cohort. We have thus identified TLR8 as an important driver of TFH cell differentiation and a promising target for TFH cell–skewing vaccine adjuvants.