When the Communist government took over he was appointed head of the Afghan intelligence service in 1978.
In September 1979 Sarwari was involved in a plot to oust Prime Minister Hafizullah Amin. After the failure of the plot, he escaped to the Soviet Embassy, where he was given asylum until the Soviet invasion and the fall of Amin in December 1979.
After the invasion, under the government of Babrak Karmal, Sarwari was first given the task of deputy prime minister, but he was soon removed from the government and posted as ambassador to Mongolia.
In 1992, after the collapse of the Communist regime, Sarwari was arrested and remained in prison for more than 13 years.
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 die by firing squad for ordering the killing of over 400 people; he was cleared of charges involving conspiracy against the post-Communist government. His is the first trial involving war crimes in Afghanistan.
- "AFGHANISTAN: Communist era mass grave discovered highlights need for post-war justice". Reuters. 22 December 2006. Retrieved 2008-03-01. "In January this year, a former Afghan intelligence chief, Assadullah Sarwary was sentenced to death for his alleged involvement in mass killings during the rule of Noor Mohammad Taraki."
- Assadullah Sarwari at Trial Watch.