The human immunodeficiency virus (HIV)-specific cytotoxic T lymphocyte (CTL) response is critical in controlling HIV infection. Since the immune response does not eliminate HIV, it would be beneficial to develop ways to enhance the HIV-specific CTL response to allow long-term viral suppression or clearance. Here, we report the use of a protective chimeric antigen receptor (CAR) in a hematopoietic stem/progenitor cell (HSPC)-based approach to engineer HIV immunity. We determined that CAR-modified HSPCs differentiate into functional T cells as well as natural killer (NK) cells in vivo in humanized mice and these cells are resistant to HIV infection and suppress HIV replication. These results strongly suggest that stem cell-based gene therapy with a CAR may be feasible and effective in treating chronic HIV infection and other morbidities.