HIV-2, which is common in West Africa, is genetically different from HIV-1, the virus that has spread around the world, also causing AIDS.
An international team of researchers studying the genetic code of two subtypes of HIV-2 reported that one type first entered the human population before 1940 and the other before 1945.
Their findings are reported in Tuesday's online edition of Proceedings of the National Academy of Sciences.
Certain viruses can pass from animals to humans, and scientists believe that both forms of HIV are related to SIV, simian immunodeficiency virus.
AIDS caused by HIV-2 didn't reach epidemic proportions in West Africa until the 1960s, said Annemie Vandamme of Catholic University in Leuven, Belgium, one of the researchers.
The disease first appeared in Guinea-Bissau, and its sharp increase coincided with the war of independence there between 1963 and 1974. That may have been because of use of non-sterile injections during the war, along with increased sexual activity, Vandamme said.
Guinea-Bissau was a colony of Portugal, and the report noted that the first European cases of HIV-2 were Portuguese veterans who had served during that war.
A previous analysis of the evolutionary tree of HIV-1 indicated it moved into humans around 1930.