Using wild-type and TLR7-deficient mice, we show that TLR7 activation enhances early antiviral T cell responses but subsequently increases PD-L1/PD-L2 expression, promoting T cell exhaustion at later stages of infection. Here, TLR7 is linked to infection.