The three-member court sentenced him over a high treason charge that has been pending since 2013.
Gen Musharraf seized power in a military coup in 1999 and served as the country’s president from 2001 to 2008.
He is currently in Dubai after being allowed to leave the country for medical treatment in 2016.
The charge relates to Gen Musharraf’s suspension of the constitution in 2007, when he imposed emergency rule in a move intended to extend his tenure.
He issued a video statement from a hospital bed earlier this month, describing the case against him as “baseless”.
Gen Musharraf is the first military ruler to ever stand trial in Pakistan for overruling the constitution.
The verdict was announced Tuesday with a 2-1 majority.
What’s the case about?
In November 2007, Gen Musharraf suspended the constitution and imposed emergency rule – a move which sparked protests. He resigned in 2008 to avoid the threat of impeachment.
When Nawaz Sharif – an old rival whom he deposed in a coup in 1999 – was elected prime minister in 2013, he initiated a treason trial against Gen Musharraf and in March 2014 the former general was charged for high treason.
Gen Musharraf argued the case was politically motivated and that the actions he took in 2007 were agreed by the government and cabinet. But his arguments were turned down by the courts and he was accused of acting illegally.
According to the Pakistani constitution, anyone convicted of high treason could face the death penalty. Gen Musharraf has been living in Dubai since 2016 and he has steadfastly refused to appear before the court, despite multiple orders.
Why is it significant?
The indictment of Gen Musharraf in 2014 for treason was a highly significant moment in a country where the military has held sway for much of its independent history.
Many of Pakistan’s army chiefs have either ruled the country directly after coups, as Gen Musharraf did, or wielded significant influence over policymaking during periods of civilian rule.
But Gen Musharraf was the first army chief to be charged with such a crime and it is believed that the powerful military has watched the case carefully.
Analysts say the institution is deeply aware that how the case proceeds could set a precedent.
Who is Gen Musharraf?
He was appointed to lead the Pakistani army in 1998.
The army’s involvement in the Kargil War in May 1999 caused a major rift between him and then-Prime Minister Nawaz Sharif, and the army general seized power in a coup in 1999.
Serving as president until 2008, Gen Musharraf survived numerous assassination attempts and plots against him during his time in power.
He is best known internationally for his role in the US “war on terror”, which he supported after the 9/11 attacks despite domestic opposition.
Gen Musharraf left the country after relinquishing the presidency in 2008, but returned in 2013 to contest the general elections, when he was barred from standing by the courts and was embroiled in several cases.
He appeared only twice in hearings for treason and earlier spent time at an army health facility or on his farm in Islamabad. He subsequently moved to Karachi in April 2014, where he lived until his departure two years later.