Dysfunctional CD8+ T cells present in chronic virus infections can express programmed death 1 (PD-1) molecules, and the inhibition of the engagement of PD-1 with its ligand (PD-L1) has been reported to enhance the antiviral function of these T cells. We took advantage of the wide fluctuations in levels of viremia which are typical of chronic hepatitis B virus (HBV) infection to comprehensively analyze the impact of prolonged exposure to different virus quantities on virus-specific T-cell dysfunction and on its reversibility through the blocking of the PD-1/PD-L1 pathway. We confirm that chronic HBV infection has a profound effect on the HBV-specific T-cell repertoire. Despite the use of a comprehensive panel of peptides covering all HBV proteins, HBV-specific T cells were rarely observed directly ex vivo in samples from patients with chronic infection, in contrast to those from patients with acute HBV infection. In chronic HBV infection, virus-specific T cells were detected mainly in patients with lower levels of viremia. These HBV-specific CD8+ T cells expressed PD-1, and their function was improved by the blocking of PD-1/PD-L1 engagement. Thus, a broad spectrum of anti-HBV immunity is expressed by patients with chronic HBV infection and this spectrum is proportional to HBV replication levels and can be improved by blocking the PD-1/PD-L1 pathway. This information may be useful for the design of immunotherapeutic strategies to complement and optimize available antiviral therapies.