O'Malley was born in Limerick in 1939. His family had long been involved in politics: His maternal grandfather, Denis O'Donovan, was murdered during the War of Independence by the Black and Tans, two of his uncles and his father held the office of Mayor of Limerick, and his uncle Donogh O'Malley was a Minister for Education.
O'Malley was educated at the Jesuit Crescent College and at University College Dublin, from which he graduated with a degree in law in 1962. In 1968, after Donogh O'Malley died suddenly, Desmond O'Malley was elected to Dáil Éireann as a Fianna Fáil Teachta Dála (TD) in the subsequent by-election for the Limerick East constituency. At the time it was believed that this by-election victory was partly due to Neil Blaney and his "Donegal Mafia". Blaney would subsequently regret aiding O'Malley in his election.
Following the 1969 general election O'Malley was appointed Parliamentary Secretary to the Taoiseach, Jack Lynch, and also Parliamentary Secretary to the Minister for Defence, Jim Gibbons. O'Malley had a central role in the prosecutions that arose from the Arms Crisis of 1970. The case against the accused government ministers Charles Haughey and Neil Blaney was dismissed in the Supreme Court, and both ministers were acquitted.
In 1970 O'Malley succeeded Micheál Ó Móráin as Minister for Justice. His plans to introduce internment without trial for Provisional IRA suspects in the Republic were not implemented, but as the subject of an assassination threat, he was permitted to carry a handgun and was frequently moved from house to house.
At the 1977 general election Fianna Fáil received a 23-seat majority in Dáil Éireann and O'Malley became Minister for Industry and Commerce at a time when Ireland's economic fortunes were going into rapid decline. In 1979, following Jack Lynch's resignation as Taoiseach and leader of Fianna Fáil, two candidates fought in the leadership election, George Colley and Charles Haughey. O'Malley and Martin O'Donoghue managed Colley's campaign, but Haughey won. Colley and O'Malley retained their positions in the government, but O'Donoghue's department was scrapped.
Following the February 1982 general election, Fianna Fáil, led by Haughey, failed to win an overall majority in the Dáil. Haughey was seen as the main reason for the election defeat. George Colley threw his support behind O'Malley as a leadership challenger, but no vote on the party leadership was taken. Haughey was elected Taoiseach again after negotiating confidence and supply arrangements with Sinn Féin The Workers' Party and two independents. O'Malley was appointed to the Cabinet as Minister for Trade, Commerce and Tourism.
A large number of TDs quickly grew disillusioned with Haughey's leadership and threw their support behind O'Malley in an effort to oust the incumbent leader. On 1 October 1982, a challenge to Haughey was initiated by the Kildare TD, Charlie McCreevy. O'Malley was on holiday in Spain at the time but rushed back to put his own name forward as a possible alternative to Haughey. He and his supporters resigned from the Cabinet. Haughey won an open vote by 58 votes to 22, with the result that those TDs who voted against Haughey, including O'Malley, became known as the Gang of 22.
In 1983 a Fine Gael–Labour Party coalition government took office and its Minister for Justice, Michael Noonan, revealed that Haughey's government had been involved in the tapping of certain journalists' telephones. This set off another leadership struggle, with O'Malley, Gerry Collins, Michael O'Kennedy, Brian Lenihan and John P. Wilson all showing an interest in replacing Haughey. However, an official inquiry into the telephone tapping cleared Haughey of any wrongdoing and put more blame on Martin O'Donoghue than the other TDs involved. Haughey retained the leadership by 40 votes to 33.
George Colley died in 1983 and Martin O'Donoghue was no longer a TD. O'Malley became isolated within Fianna Fáil, with many of his supporters giving up hope of ever beating Haughey.
In May 1984 the New Ireland Forum report was published. Haughey had been a key figure in the Forum and had agreed to several possible solutions for solving the problem of Northern Ireland. However he responded to the publication by declaring that the only possible solution was a United Ireland. O'Malley strongly criticised this position and accused Haughey of stifling debate. At a meeting of the Fianna Fáil Parliamentary Party to discuss the report the whip was removed from O'Malley and he became an independent TD.
In early 1985 a bill was introduced by the Fine Gael–Labour Party government to liberalise the sale of contraceptives. Fianna Fáil opposed the bill, but O'Malley considered it a matter of conscience and wanted to support it. When it came to a vote he abstained. His famous phrase became "I stand by the Republic" stated during the extensive debates:The politics of this would be very easy. The politics would be, to be one of the lads, the safest way in Ireland. But I do not believe that the interests of this State, or our Constitution and of this Republic, would be served by putting politics before conscience in regard to this. There is a choice of a kind that can only be answered by saying that I stand by the Republic and accordingly I will not oppose this Bill.
On 26 February 1985 he was summoned to a party meeting and charged with "conduct unbecoming". Following a roll-call vote he was expelled from Fianna Fáil by 73 votes to 9.
Immediately afterwards, Desmond O'Malley was contacted by a young Fine Gael activist, Michael McDowell, who encouraged O'Malley to found a new political party and offered any help he could give. On 21 December 1985, O'Malley announced the formation of the Progressive Democrats. He was joined by Mary Harney (like O'Malley, an independent TD expelled from Fianna Fáil), and later by Fianna Fáil TDs Bobby Molloy and Pearse Wyse and Fine Gael TD Michael Keating. At the 1987 general election, the Progressive Democrats won 14 seats, making the new party the third-biggest in the Dáil. Among the TDs elected for the new party were O'Malley and his cousin Patrick O'Malley; Anne Colley, daughter of George Colley; Martin Gibbons, son of Jim Gibbons; Michael McDowell and Martin Cullen. Fianna Fáil returned to power with Haughey as head of a minority government.
In May 1989 Haughey called an early general election in the hope of winning an overall majority, but Fianna Fáil actually lost seats. The Progressive Democrats also lost seats, but held the balance of power. Haughey failed to be elected Taoiseach, as the Progressive Democrats voted for Fine Gael's leader Alan Dukes, but after Haughey formally resigned he entered into negotiations with the Progressive Democrats about forming a coalition. On 5 July 1989 Haughey and O'Malley agreed a deal for government, and O'Malley was appointed Minister for Industry and Commerce.
In 1990 Fianna Fáil's nominee in the presidential election was Brian Lenihan. A few weeks before the election a scandal broke over the accusation that Lenihan had phoned the President, Patrick Hillery in 1982, asking him not to dissolve the Dáil following the fall of Garret FitzGerald's government. Lenihan had always denied this, but now new evidence had come to light. O'Malley told Haughey that the Progressive Democrats would pull out of the coalition and support a no-confidence motion tabled by the opposition unless Lenihan left the government or Haughey opened an investigation into the incident. Haughey sacked Lenihan.
In early 1992 the programme for government was up for renewal. When it was revealed by Seán Doherty that Haughey had authorised the tapping of two journalists' telephones in 1982, O'Malley decided that the Progressive Democrats could no longer remain in his government. Haughey resigned on 11 February 1992 and was replaced as party leader and Taoiseach by Albert Reynolds. O'Malley and the Progressive Democrats continued in the coalition until Reynolds accused O'Malley of being "dishonest" while giving evidence to the Beef Tribunal. The collapse of the coalition led to the general election. Fianna Fáil returned to power in coalition with the Labour Party and the Progressive Democrats moved into Opposition.
In October 1993 O'Malley retired as leader of the Progressive Democrats. He was succeeded by Mary Harney, one of the co-founders of the party. In 1994 O'Malley ran for the European Parliament but was defeated by Pat Cox, a sitting MEP who left the Progressive Democrats to run as an independent when O'Malley was selected as the candidate to replace him. O'Malley remained as a TD until his retirement from politics at the 2002 general election, when he was succeeded as TD by his cousin Tim O'Malley. His daughter Fiona O'Malley was elected to the Dáil as a Progressive Democrats TD. His son Eoin O'Malley is a political scientist in Dublin City University.
In October 2014 he released a memoir, Conduct Unbecoming: A Memoir. The book received mixed reviews. The Irish Examiner described it as "pungent and to the point" while historian Diarmuid Ferriter, writing for the Irish Times, dismissed it as "an infuriatingly bad and poorly-written book", noting that "all sorts of assertions are made without evidence or elaboration and this approach is maintained throughout the book, underlining the lack of coherence or focus". Ferriter also took issue with a number of claims made by O'Malley particularly regarding the Arms Crisis.