[1] In the war against the Soviets from 1980 to 1990, he was the political head of the Jamiat-e Islami Party of Afghanistan and close advisor to Commander Ahmad Shah Massoud.
Deported from the same country for his high rank in the Northern Alliance, he went to New Delhi in 1996 as the Ambassador of the Afghanistan (Anti-Taliban) where he stayed for many years.
[3] On September 9, 2001, Khalili was sitting next to Ahmad Shah Massoud when two men posing as journalists set off a bomb placed in their camera.
Khalili and Massoud met for the first time in October 1978 after the communist Saur Revolution had overthrown the government of Mohammed Daoud Khan.
When the Soviets retreated from Afghanistan, the Wall Street Journal named him "the Afghan, who won the cold war".
In late 1995 Pakistan's government expelled Khalili in what the Washington Post called "the latest sign of worsening relations between the two countries".
The United Nations and the international community kept recognition with the Islamic State of Afghanistan government Masood Khalili was working for.
"[26] The passport, which Massoud had told him to put into his shirt pocket, had stopped eight pieces of shrapnel from entering Khalili's heart and had thereby saved his life.
[29] About the presence of foreign troops in Afghanistan he said in 2008: About the struggles faced by his country he stated in 2006: Khalili was later appointed the Afghan ambassador to Spain in 2010.
In August 2019 he was mugged on the street in Barcelona suffering a leg injury while in the city to attend celebrations marking Afghanistan's Independence Day.