According to a study, published in the journal Science, it looks like the first people with HIV caught the virus from Cameroon chimpanzees that harbor a simian immunodeficiency virus (SIV).
SIV antibodies were found in up to 35% of fecal samples from wild-living P. t. troglodytes apes (chimpanzees).
The HIV epidemic started in a different place though -- in Kinshasa, the Democratic Republic of Congo. Studies have traced HIV to a man who gave a blood sample in 1959 in Kinshasa. The primate-to-human transmission likely ocurred much earlier, in the 1930s.
How did people contract HIV from chimpanzees?
The chimpanzees in that area of Cameroon are hunted for meat. One of the researchers explains:
"We know that you don't get it from petting a chimp, just like you can't get HIV from a toilet seat. It requires exposure to infected blood and infected body fluids. So if you get bitten by an angry chimp while you are hunting it, that could do it."
Research suggests HIV originated in Cameroon chimps. CNN.
Chimpanzee Reservoirs of Pandemic and Nonpandemic HIV-1. Science DOI: 10.1126/science.1126531.
Tracking the Epicenter of AIDS: Africa, 1930. NPR.
Origins of HIV. Listen to an interview with one of the study authors. Time Global Health Update.
HIV's Ancestry Traced To Wild Chimps in Cameroon. WSJ (subscription required).
Retroviruses and herpesviruses found in illegally imported wildlife products (bushmeat) seized at US airports. JAMA, 2012.
Image source: Wikipedia