On returning to Ireland, he became involved in the Labour Party and was employed as an Education Officer for the Irish Transport and General Workers' Union (ITGWU).
[3] His agent was Bob Mitchell, Chairman of Dublin University Fabian Society, who could claim credit in a dirty campaign for picking up transfers to squeeze out the Labour Party front-runner on the 11th recount.
When he was first elected to the Dáil, O'Leary encouraged the Labour Party to take a more left-wing stance in its policies.
He was initially strongly opposed to the idea of a coalition with Fine Gael, but following the 1969 general election he believed that there was a need for a new approach.
After the election, a new Fine Gael–Labour government was formed, but O'Leary was kept out of cabinet office by his former Labour colleagues.
He unsuccessfully contested the 1992 general election in Cork North-Central and received about 2% of the valid poll.