Antiretroviral therapy (ART) is able to suppress HIV-1 replication indefinitely in individuals who have access to these medications, are able to tolerate these drugs, and are motivated to take them daily for life. However, ART is not curative. HIV-1 persists indefinitely during ART as quiescent integrated DNA within memory CD4+ T cells and perhaps other long-lived cellular reservoirs. In this Review, we discuss the role of the immune system in the establishment and maintenance of the latent HIV-1 reservoir. A detailed understanding of how the host immune system shapes the size and distribution of the viral reservoir should lead to the development of a new generation of immune-based therapeutics, which may eventually contribute to a curative intervention.