Shinwari was born in the Haska Mina village of Shinwar in Nangarhar Province, Afghanistan. He completed Islamic studies in Kabul and became a teacher at Ibn-i-Sina High School in 1954. A few years later he moved to Nangarhar and in 1974 he migrated to neighboring Pakistan. In 2002, Shinwari was appointed Chief Justice by Afghan President Hamid Karzai.
In 2003 Shinwari spoke out against co-education—the education of boys and girls in shared facilities—while clarifying that he did not object to the education of girls and women in principle, just not in facilities shared with men and boys. Shinwari also led the Supreme Court's efforts to ban Cable TV.
According to Eurasianet Shinwari was responsible for re-instating the ministry formerly known as the "Ministry for the Promotion of Virtue and Prevention of Vice".
On December 8, 2004 Shinwari administered the oath of office to Hamid Karzai when he was elected President of Afghanistan.
Shinwari addressed the 17 Afghan who had been held in Guantanamo whose Combatant Status Review Tribunals determined they had never been "enemy combatants" after all. Their Tribunals had been held between August 2, 2004 and late January 2005. Carlotta Gall of the New York Times reported that the Chief Justice encouraged the men to regard their detention as something sent from God. The reports stated that the Chief Justice warned the cleared men that a candid description of their detention could damage the chances of other Afghan captives to be released.
Shinwari is also reported to have distinguished between three categories of Guantanamo captives:
In 2006, President Karzai renominated Shinwari to the position of Chief Justice, despite constitutional concerns regarding his degree in Islamic law. However, the parliament rejected the nomination. Shinwari served as Chief Justice until a new candidate, Abdul Salam Azimi, was approved by parliament.
By Western standards, he was widely considered to be a very conservative Islamist, and in his short term as chief justice some of the court's rulings included:the court, during the 2004 presidential election campaign, sought to ban a candidate who questioned whether polygamy was in keeping with the spirit of Islam;
they have called for an end to cable television service in the country, at least pending government regulation, due in part to the apparent influence of films from Bollywood, which were allegedly prurient ;
the court upheld the death penalty for two journalists convicted of blasphemy for saying the Islam being practised in the country was reactionary;
they banned women from singing on television ; and
they ruled that a girl, given as a bride when 9 years old and now 13, could not get a divorce from her abusive husband.
According to the International Crisis Group Shinwari appointed 128 judges, in addition to the original nine, and that of the credentials of 36 judges they were able to examine, none of the new judges had a degree in secular law:
During Ramadan, 2008, there were rumors that Saudi King Abdullah was attempting to broker peace talks between the warring parties from Afghanistan. Former Taliban Foreign Minister Wakil Ahmad Mutawakil former Taliban Ambassador to Pakistan Abdul Salem Zaeef and Shinwari were among leading Afghan figures who met with King Abdullah.
Zaeef acknowledged being invited by King Abdullah to dine with other leading Afghan figures, from the Karzai government, the Taliban, Gulbuddin Hekmatyar's Hezb-e-Islami and other former members of the Taliban. Zaeef denied this meeting should be characterized as "peace talks". He stated that none of the individuals at this meeting had been authorized to conduct negotiations. Zaeef denied anyone discussed Afghanistan at this meeting.