Labour
He began his political career when he was elected to Dáil Éireann as a Labour Party TD for Dublin South-West at the 1965 general election. He held a seat for the party in the constituency until a revision of constituencies in 1977, when he was elected for Dublin Ballyfermot. At the first direct elections in 1979 to the European Parliament, he was elected with his running mate Michael O'Leary to the Dublin constituency.
In 1963, O'Connell joined the Labour Party in response to chronic unemployment and poverty, and published and edited the party paper Labour News with Proinsias Mac Aonghusa. Using his medical practice as a platform, he financed a personal political organisation based on paid canvassers and private opinion polls while generally refusing political donations. In the 1965 general election, he was elected as a Labour TD for Dublin South-West. His constituency became largely associated with him, challenged only briefly by Labour TD Seán Dunne in the 1969 Irish general election. He was elected to the Dáil nine times amid several constituency boundary revisions, representing Dublin South-West (1965–77), Dublin Ballyfermot (1977–81), and Dublin South-Central (1981–87 and 1989–93). He also served as an MEP for Dublin (1979–81) and as a member of Dublin Corporation, attributing his limited attendance at the European Parliament to a fear of flying and eventually resigning his seat there.
Although widely supported by his constituents, O'Connell's volatility and emphasis on problem-solving over party coherence led to distrust among colleagues. He was highly active in the Dáil and drew media attention by sending a telegram to the Pope regarding homeless constituents living in Griffith Barracks. His advocacy contributed to securing compensation for Irish children born with deformities after their mothers received thalidomide during pregnancy. His election as a Labour TD coincided with the party's shift from conservative Catholic labourism toward a more secular and professional social democracy. He was a frequent critic of the Irish Catholic hierarchy and consistently supported the legalisation of contraception, both as a TD and as owner-editor of the Irish Medical Times.
O'Connell engaged in labour dispute resolution, mediating between CIÉ and the breakaway National Busmen's Union, and was the only Labour TD to oppose the expulsion of Senator Jack McQuillan over a trade union split. After 1969, he undertook private peace initiatives in Northern Ireland, meeting with representatives from both sides during the Troubles. Although an Irish republican, he expressed respect for the forthrightness of the Ulster Defence Association leadership and Ian Paisley. In 1972, he arranged meetings between British opposition leader Harold Wilson and Provisional IRA representatives (Dáithí Ó Conaill and Seán Mac Stíofáin) in Dublin (March) and Luton (July), actions which attracted criticism from some public figures concerned about encouraging paramilitary activity. That October, he attempted to counter Conor Cruise O'Brien's criticism of SDLP policy.
As Labour spokesman on social welfare, O'Connell played a role in shifting the party toward coalition government in May–June 1972. When the Fine Gael–Labour alliance won the 1973 Irish general election, he was not appointed Minister for Health; the portfolio was retained by party leader Brendan Corish. O'Connell declined an offer to become Corish's special adviser. He was among the few Labour TDs to oppose disciplining David Thornley for attending a Sinn Féin demonstration and criticised coalition security legislation. From 1977 to 1979, he served as Labour spokesman for health, criticising Charles Haughey as Minister for Health over legislation regulating prescription-only access to contraception for married couples, although by the mid-1970s a friendship developed between O'Connell and Haughey, leading some within Labour to suggest he moderated his criticism.
O'Connell's Labour Party career ended following constituency boundary changes. Party leader Frank Cluskey moved into Dublin South-Central and expected O'Connell to contest Dublin West, but O'Connell argued that, as a sitting TD, he should choose his constituency, claiming his personal support could secure two seats. After being refused one of three nominations in South-Central, he became an Independent TD.