On 9 April 2012, Gillani chaired the second energy conference held in Lahore. As part of the federal government's energy conservation plan, Gillani had ordered that air-conditioners of the Prime Minister House and Prime Minister's Secretariat could not be switched on before 11 am. According to the government sources, Gillani's government has levelled up the nuclear energy programme up ~ 78% for two combined 664 MW commercial nuclear plants, C-3 and C-4 at Chashma Nuclear Power Complex to be completed at their record time. The ground work on Karachi Nuclear Power Complex was also laid in 2012 as part of his nuclear policy. Amid public rage and media pressure, the Gillani government also intensified its ground work on the Thar coal electric project that could develop another source of cheap electricity generation, despite the strong opposition by the planning commission.
On 18 June 2012, a strong and powerful public protest took place against the electricity shortage and load shedding, in Punjab Province. The offices of WAPDA corporations were destroyed, a fashion mall was looted while a completely gutted a three carriages of the train. After learning the news, Gillani summoned a national energy conference in Islamabad to take notice of power crisis. Gillani ordered his staff to double its effort to harness the electricity by any means of force after chairing the conference.
In January 2012, Prime minister Gillani announced the "economic sector have been achieved during the first six months of the current fiscal due to the prudent policies of the present government". In the parliament, Gillani pointed out that the fiscal deficit had come down from 9.4% to 7.6% and inflation that had reached 25% had been reduced to 9.7% during December 2011. In a policy statement, Gillani stated that the "country's GDP growth rate will be 4% basically due to the enhanced agricultural production and the web of taxation has been increased". The tax collection in 2011 was more 27% comparing to 2010. An unsuccessful attempt was carried out by Gillani's government to privatise the mega-state corporations, particularly the power sector; major nationalised industries such as WAPDA, IESCo, TESCo, PEPCo were proposed by the finance ministry to privatise the power distribution companies. Major worker's strike were initiated by the central labour unions, and after receiving much criticism, his government halted the privatisation programme of energy sector, and nationalised the remaining power sector industries due to public pressure.
On 1 June 2012, prime minister Syed Yusuf Raza Gilani claimed that the government was committed to resolving the energy crisis and achieving energy security for the country, adding that Pakistan's power sector was presently facing a wide demand-supply gap, which had necessitated the enhancement of generation capacity as well as related infrastructure.
In 2012, Gilani lastly paid a state visit to the United Kingdom and met with British counterpart David Cameron which opened a new chapter in friendship when both the countries decided to transform their bilateral relationship into an "Enhanced Strategic Partnership", covering trade and commerce, economic development, defence and security, culture, education and health. At the press conference with the British counterpart, Gillani termed the Pakistan-UK relationship as unique, warm and cordial and said it was based on shared values, history, culture and strong people-to-people contact.
In 2012, Gilani attempted to end the violence and bloodshed in Afghanistan after going to Qatar to meet the top Taliban leadership. Subsequently, Gilani discuss the representatives of Taliban and Qatari government to established an office there. Gillani also secured his place at the negotiations on Afghanistan's future.
In 2012, he notably called for "Asian Unity" during the attending session of the Boao Forum for Asia in China. Gilani backed the Chinese economic reform and defended a new transit trade agreement with Afghanistan and declaration of most-favoured nation status for India. Gilani called for the united regional co-operation for building the gas pipelines and communication as factors that, in his view, alters the regional situation radically. In 2010, relations with Germany was improved and Gilani succeeded in ratifying the free-trade agreement and the investment treaty to increase the German direct investment in the country. In May 2011, Gillani paid a three-day state visit to France to hold discussion on security co-operation and economic partnership. Gallani met with Nicolas Sarkozy and signed agreement on co-operation on energy, telecommunication, infrastructure development, banking, environment, waste management and defence.
The relations with Russia were pushed to level of intensity of bilateral relations, which he termed it as "New Momentum". In 2012, Gillani publicly greets Vladimir Putin for successfully contesting in Russian presidential elections.
On 29 March 2012, a civilian resident of Johar Town Lahore, Tariq Ahmed, filed a court petition in the Lahore High Court, seeking to hear the case of disqualification of Yousaf Raza Gillani. The plea was filed in the High Court in which the petitioner took the stance that "Fauzia Gillani— spouse of Prime Minister Gillani received loans of millions of rupees from the Agriculture Development Bank Ltd (ADB) and the National Bank of Pakistan for the two mega-corporation owned by the Gillani family of which Fauzia Gillani served both megacorporation's executive director. None of the loans of millions of rupees were paid back to the banks.
On 26 April 2012, Gillani was convicted on the charges of Contempt of Court, becoming Pakistan's first Prime Minister to be convicted while holding office. He was sentenced to be held in custody till the rising of court, a symbolic sentence lasting 30 seconds. The verdict was a short order and the full verdict of the court (over 70 pages) had been reserved, and was handed over after few days' time. Gillani's lawyer Aitzaz Ahsan announced that the Prime Minister shall file an appeal against the Supreme Court's verdict once the full verdict is handed over, despite opposition parties urgings. However, Gilani refused to step down.
On 28 May 2012, the issue of the disqualification of the Prime Minister was put to rest after a ruling by Speaker of the National Assembly Dr. Fehmida Mirza, to not to send the disqualification reference to the Election Commission of Pakistan.
On 24 May 2012, the Peoples Party directed the case to speaker of the National Assembly to review the case of Gillani, in light of the apex court's verdict. The speaker ruled out that, despite being convict, Gillani cannot be disqualified from the provisions of the paragraph Article 63(g) or either Article 63(h) of the Constitution. Following her rulings, the speaker also decided not to forwarded the reference against Gillani's disqualification to Election Commission. On 29 May, Gillani appeared in media and vigorously defended speaker's decision and quoted: "..(...) The National Assembly Speaker Dr. Fehmida Mirza’s ruling pertaining to the disqualification reference was final and could not be challenged...()...".
On 6 June 2012, the Supreme Court admitted the petitions and a three-member bench was formed to be headed by Chief Justice Iftikhar Mohammad Chaudhry to hear the petitions. After hearing petitions by both sides, the notices were sent to prime minister, speaker of the national assembly, and other concerned offices to the case. The hearing of the petitions was subsequently adjourned to 14 June 2012. On 15 June, Gillani's lawyer senator Aitzaz Ahsan defended speaker's move, and argued that "the office of speaker was no more 'a post office' after the 18th Amendment as it had been drastically changed" and that "[the speaker] had used her quasi judicial powers and gave her ruling over the issue with due application of her mind". Ahsan maintained that the prime minister had accepted the conviction but not disqualification. On 17 June, Ahsan concluded that speaker's ruling was in accordance with parliamentary ethics and reiterated that the ruling in the contempt of court case did not refer to a disqualification of the prime minister. Mirza also submitted the written statement in which, she maintained that the court's ruling did not order that a reference on the issue should directly be sent to the Election Commission, and has had the constitutional authority to decide over the disqualification of a member of the assembly. Her written statement was discarded by the supreme court, and reserved the final decision of Gillani's qualification matter. At the end of the proceedings, the chief justice marked that the petitions had stated that a "convicted person" was representing the people; the prime minister represented the public and not a party. Minutes before adjourning the court, the chief justice quoted: "The fate of the people was in the hands of a man who had been convicted by the Supreme Court... (...)..".
Finally on 19 June 2012, the Supreme Court of Pakistan ousted and further disqualified Prime Minister Gillani citing the earlier conviction on 26 April 2012. The Supreme Court in its standing orders, said that "Gillani was ineligible to hold the Prime Minister's office after April 26th conviction" and all orders given by him till date would stand null and void. Consequently, the Election Commission issued the government notification with regards to the disqualification of Gillani. The country's election commission noted that, accepting the rulings of Supreme Court, Gillani was disqualified as a member of parliament with effect immediately from 26 April 2012.