After the overthrow of the PML-N government in 1999 in a coup staged by General Pervez Musharraf, he became one of the most vocal critic of the Musharaf military regime.
In the 2008 general election, Javed Hashmi won a record three seats out of the four contested; he only lost out to Shah Mehmood Qureshi in his home city of Multan. Hashmi won National Assembly seats from Multan, Lahore and Rawalpindi beating PML-Q leader Sheikh Rashid Ahmed in the latter one.
The verdict has widely been considered as a willful miscarriage of justice by the government. All opposition parties in Pakistan, including Pakistan Peoples Party of the former Prime Minister Benazir Bhutto and six party-alliance Muttahida Majlis-e-Amal, regarded the verdict to be politically motivated by the ruling junta with malicious intent, declaring him to be a political prisoner.
On 3 August, 2007, a three-member bench of the Supreme Court of Pakistan under Chief Justice of Pakistan Iftikhar Muhammad Chaudhry granted him bail after serving approximately three and a half years in prison. Javed Hashmi was released from the Central Jail Kotlakhpat in Lahore on 4 August, 2007.
He was again placed under arrest at the declaration of a state of emergency on 3 November, 2007
Despite winning 3 seats, Hashmi refused to take oath from President Musharraf and thus did not get a place in the federal cabinet. Hashmi was one of the few people who decided not to take oath as it was against his principle. Hashmi is the senior vice president of the party and is always seen in important meeting between the PML(N) and PPPP. Hashmi is considered a political heavyweight and is well respected throughout Pakistan. He is seen many times representing the views of his party the PML N on various talk shows. It was widely reported that in the by-elections, Hashmi supported an independent candidate who was running against Makhdoom Mureed Hussain Qureshi, brother of Hashmi's old rival Makhdoom Shah Mehmood Qureshi. After Mureed Qureshi lost, many people including Mureed Hussain widely condemned the behaviour of Hashmi and said that they will report the incident to the chief of the Peoples Part , Asif Zardari. Hashmi is a strong supporter of the judges who have been sacked and it is said that Hashmi is one of the few people in the Pml N who are trying to convince the senior leadership of the Pml N to stop supporting the PPPP as they believe the PPPP is not serious and sincere when they say that they will restore the judges.