The human immunodeficiency virus type 1 (HIV-1) encodes a protein, called Vpr, that prevents proliferation of infected cells by arresting them in G2 of the cell cycle. This Vpr-mediated cell-cycle arrest is also conserved among highly divergent simian immunodeficiency viruses, suggesting an important role in the virus life cycle. However, it has been unclear how this could be a selective advantage for the virus. Here we provide evidence that expression of the viral genome is optimal in the G2 phase of the cell cycle, and that Vpr increases virus production by delaying cells at the point of the cell cycle where the long terminal repeat (LTR) is most active. Although Vpr is selected against when virus is adapted to tissue culture, we show that selection for Vpr function in vivo occurs in both humans and chimpanzees infected with HIV-1. These results suggest a novel mechanism for maximizing virus production in the face of rapid killing of infected target cells.