Hekmatyar went to a military school, but switched to Kabul University's engineering department in 1968, earning the nickname of "engineer Hekmatyar" among his followers. He was a member of the People's Democratic Party of Afghanistan (PDPA) until he was accused in 1972 of the killing of a Maoist student. He was found guilty and sent to jail.
After that, he went to Pakistan, where in 1975, he founded the Hezbi Islami party. It has been said that it was Hekmatyar who began the anti-Daoud movement's resurgement in the area of Panjshir. Members of Hezbi Islami and Hekmatyar himself denied he was ever involved with the communists.
During the Soviet occupation of Afghanistan in the 1980s, Hekmatyar received billions of dollars in military assistance from the funds the United states channeled to the mujahadeen through Pakistan's ISI. He was described as power hungry, ruthless and cunning by the Pakistani government.
After the fall of the Democratic Republic of Afghanistan, Hekmatyar signed the Islamabad accords, which nominally made him Prime Minister. However, the accords fell apart and he aligned himself with Abdul Rashid Dostum's Hezbi Wahjat. Together they layed siege to Kabul, fighting Burhanuddin Rabbani and his Defense Minister Ahmed Shah Massoud. From 1992 to 1996, the warring factions destroyed 70% of Kabul and killed 50,000 people, most of them civilians.
The devistation and factionalization allowed the Taliban to take control in 1996, even when, a few months before the Taliban captured Kabul in September of that year, Rabani and Hekmetyar finally formed a power-sharing government in which Hekmetyar was prime minister. Hekmatyar fled to Iran where he continued to lead the Hezbi-Islami party.
After the 2001-2 U.S. invasion of Afghanistan and the fall of the Taliban, Hekmatyar (still operating in Iran) rejected the U.N-brokered accord of December 5, 2001, saying the pact negotiated in Germany amounted to a U.S.-imposed government for Afghanistan.
In early 2002, Iran closed Hekmatyar's offices, and his whereabouts became unknown.
The United States accuses him of urging the Taliban to re-form and to fight the United States. He is also accused of offering rewards for those who kill U.S. troops. He has been labeled a war criminal by members of the U.S.-backed President Hamid Karzai's government. He is also a suspect behind the September 5, 2002 assassination attempt on Karzai that killed more than a dozen people.
On December 25 of 2002, the news broke that American spy organizations had discovered Hekmatyar attempting to become a member of Al Qaeda. According to the news, he had said that he was available to aid them. However, in a video released by Hekmatyar September 1, 2003, he denied forming alliances with the Taliban or al-Qaeda but praised attacks against U.S. and international forces.