Dendritic cells (DCs) phagocytose, process, and present bacterial antigens to T lymphocytes to trigger adaptive immunity. In vivo, bacteria can also be found inside T lymphocytes. However, T cells are refractory to direct bacterial infection, leaving the mechanisms by which bacteria invade T cells unclear. We show that T cells take up bacteria from infected DCs by the process of transinfection, which requires direct contact between the two cells and is enhanced by antigen recognition. Prior to transfer, bacteria localize to the immunological synapse, an intimate DC/T cell contact structure that activates T cells. Strikingly, T cells efficiently eliminate the transinfecting bacteria within the first hours after infection. Transinfected T cells produced high levels of proinflammatory cytokines and were able to protect mice from bacterial challenge following adoptive transfer. Thus, T lymphocytes can capture and kill bacteria in a manner reminiscent of innate immunity.