In 1992, Whelehan was the Attorney General in the extremely controversial "X Case", in which he sought an injunction to prevent "Miss X", a teenager pregnant from a sexual assault, travelling abroad for an abortion to the United Kingdom. This was a test case of the Eighth Amendment of the Constitution of Ireland, which guarantees the "right to life of the unborn". In a 2010 documentary, government press secretary Seán Duignan said some ministers felt Whelehan should have turned a blind eye to the case. Whelehan expressed regret for "the upset, the sadness and the trauma which was visited on everybody involved", but felt he had a duty to uphold the Constitution, and that only he had locus standi for the fetus involved.
In March 1993, the Royal Ulster Constabulary requested the extradition of Brendan Smyth, a priest arrested for child sex abuse. Eight months later, in November 1993, the request was still at the Office of the Attorney General, when the RUC informed the Office that Smyth had voluntarily given himself up in Northern Ireland. In October 1994, a UTV documentary on Smyth suggested the delay in processing the request was deliberate. Whelehan stated he had not known of its existence. The delay was variously blamed on short staffing in the office and the complexity of the case, which might fall under a previously unused provision of the law on extradition. Reynolds later won a libel suit against The Times of London over an article on the affair. Whelehan prepared a memorandum on the Smyth case for the Taoiseach, which was delivered on 15 November 1994. This claimed the case was the first one to involve section 50 of the Extradition Act 1965 of the Extradition.
retired as Chief Justice of Ireland in September 1994, and Liam Hamilton was promoted from President of the High Court to replace him. In early 1994, when the government was considering forthcoming judicial appointments, Whelehan expressed an interest in becoming President of the High Court and a Judge of the High Court. This was opposed by TánaisteDick Spring, leader of the Labour Party, Reynolds' coalition partner; negotiations on a quid pro quo were held in October 1994. On 11 November 1994, while the Brendan Smyth controversy was still in the news, Reynolds appointed Whelehan to the vacancy, at a cabinet meeting from which Labour ministers were absent. Mary Robinson, the President of Ireland, confirmed his appointment the same day, and he took his oath of office from the Chief Justice on 15 November. Over the next two days he heard one case and part of another. In the Dáil on 15 November 1994, Reynolds summarised the report he had received from Whelehan. It was then alleged that an extradition case involving another paedophile cleric, John Anthony Duggan, had been resolved promptly in 1992 after considering section 50 of the Extradition Act. Whelehan argued that, although section 50 had been considered in the Duggan case, it had not in fact been applied. Reynolds stated he regretted having appointed Whelehan, and The Irish Times reported that Whelehan's successor as Attorney General, Eoghan Fitzsimons, had tried to persuade Whelehan to resign his judgeship. Whelehan rebuffed Fitzsimons, but resigned on 17 November to "keep the judiciary out of politics". Reynolds ordered Fitzsimons to report on his predecessor's conduct of the Smyth case. The political damage caused the Labour Party to leave the coalition, though without forcing an election; instead it formed another coalition with Fine Gael and Democratic Left. Controversy over Reynolds' unilateral appointment of Whelehan led to the establishment of an independent Judicial Appointments Advisory Board to make recommendations for the government.
Later career
The rules of the Bar Council of Ireland normally prohibit former judges from working in a court of a level the same as or lower than the court on which they sat. In Whelehan's case, this would have meant he could not work in any court, as the President of the High Court is ex officio a member of the Supreme Court. The Bar Council voted in favour of making an exception to the rule for his case. The Irish Independent in 2007 reported that the Judicial Appointments Advisory Board's recommendation of Whelehan for a judgeship had been rejected by Fianna Fáil governments.