He started his legal practice as an advocate of the
Lahore High Court in 1975 and was a partner at
Cornelius, Lane and Mufti, one of the largest law firms in Pakistan. In 1999, he became a judge of the Lahore High Court but resigned in 2007 in response to the maltreatment of Chief Justice
Iftikhar Muhammad Chaudhry on 9 March. He joined the Law and Policy Department of the
Lahore University of Management Sciences in August 2007 and served as the head of the department from October 2007 to May 2009 when he joined the
Supreme Court of Pakistan. He wrote a concurrent opinion in the case declaring the
National Reconciliation Ordinance to be void
ab initio, and the leading opinion in the
suo motu case ordering wholesale giant
Makro-Habib to restore a playground in
Jamshed Town on which it had established an outlet. Justice Khawaja was one of those six judges who gave a dissenting judgement against the military courts in Pakistan, that decision came just few days before his beginning of term as CJP. Just before finishing his term as CJP, he headed a bench which issued a landmark decision directing
Government of Pakistan to adopt
Urdu as an official language according to 1973 Constitution. The decision was read out in Urdu by the CJP. ==Post-retirement==