The genetic diversity of HIV-1 represents a major challenge in vaccine development. In this study, we establish a rationale for eliminating HIV-1–infected cells by targeting cellular immune responses against stable human endogenous retroviral (HERV) antigens. HERV DNA sequences in the human genome represent the remnants of ancient infectious retroviruses. We show that the infection of CD4+ T cells with HIV-1 resulted in transcription of the HML-2 lineage of HERV type K [HERV-K(HML-2)] and the expression of Gag and Env proteins. HERV-K(HML-2)–specific CD8+ T cells obtained from HIV-1–infected human subjects responded to HIV-1–infected cells in a Vif-dependent manner in vitro. Consistent with the proposed mode of action, a HERV-K(HML-2)–specific CD8+ T cell clone exhibited comprehensive elimination of cells infected with a panel of globally diverse HIV-1, HIV-2, and SIV isolates in vitro. We identified a second T cell response that exhibited cross-reactivity between homologous HIV-1-Pol and HERV-K(HML-2)-Pol determinants, raising the possibility that homology between HIV-1 and HERVs plays a role in shaping, and perhaps enhancing, the T cell response to HIV-1. This justifies the consideration of HERV-K(HML-2)–specific and cross-reactive T cell responses in the natural control of HIV-1 infection and for exploring HERV-K(HML-2)–targeted HIV-1 vaccines and immunotherapeutics.