Sarwari received his education in the Soviet Union and would later serve as a helicopter pilot for the Royal Afghan Air Force during the monarchy of Mohammed Zahir Shah, and later as the air force garrison commander under President Mohammed Daoud Khan, who ousted Shah in a coup in 1973.
In September 1979 Sarwari was involved in a pro-Nur Muhammad Taraki plot to oust Prime Minister Hafizullah Amin.
In May 1992, after the collapse of the Afghan government, Sarwari was arrested by the Shura-e Nazar militia of Ahmad Shah Massoud and was kept in detention in Panjshir.
On December 25, 2005, he was charged with the involvement in the arbitrary arrest, torture and mass killing of hundreds of opponents during his tenure as head of Afghan intelligence for a period of one year.
On February 25, 2006, he was sentenced to death by firing squad for ordering the killing of over 400 people; he was cleared of charges involving conspiracy against the post-Communist government.