Thymic stromal lymphopoietin (TSLP) is a mucosal tissue-associated cytokine that has been widely studied in the context of T helper type 2 (Th2)-driven inflammatory disorders. Although TSLP is also produced upon viral infection in vitro, the role of TSLP in antiviral immunity is unknown. In this study we report a novel role for TSLP in promoting viral clearance and virus-specific CD8+ T-cell responses during influenza A infection. Comparing the immune responses of wild-type and TSLP receptor (TSLPR)-deficient mice, we show that TSLP was required for the expansion and activation of virus-specific effector CD8+ T cells in the lung, but not the lymph node. The mechanism involved TSLPR signaling on newly recruited CD11b+ inflammatory dendritic cells (DCs) that acted to enhance interleukin-15 production and expression of the costimulatory molecule CD70. Taken together, these data highlight the pleiotropic activities of TSLP and provide evidence for its beneficial role in antiviral immunity.