At the NSW state election in 2003, O'Neill challenged Chris Hartcher in the seat of Gosford and lost by only 272 votes. In 2007, O'Neill challenged Hartcher again in the state election for the newly created seat of Terrigal but was defeated. In 2010, she was endorsed as Labor candidate for Robertson gaining preselection over incumbent Labor member, Belinda Neal. At the 2010 Australian federal election O'Neill was challenged by Liberal candidate Darren Jameson, but won the seat with an increased margin for Labor of 1%. At the 2013 election held on 7 September, O'Neill suffered a 4% swing against her and was defeated by the Liberals' Lucy Wicks. Bob Carr had been re-elected to a six-year term in the Australian Senate, which would commence the following July, however he resigned on 24 October 2013. O'Neill was selected by Labor to fill the casual vacancy, and was appointed by the NSW Parliament on 13 November 2013. In an unprecedented situation where Carr resigned both his current term and the following six-year term, the NSW Government sought legal advice regarding the tenure of O'Neill's appointment, and discovered that it could only fill the current vacancy, and would have to wait until July to fill the future vacancy. To mitigate the cost of recalling both houses of the New South Wales parliament for a joint sitting, Premier Mike Baird proposed to convene a sitting on 2 July of two government members and two opposition members before the President of the Legislative Council to appoint O'Neill to the Senate for the term which began on 1 July. The joint sitting took just four minutes on 2 July 2014, and was attended by 13 lower house MPs and over 40 Legislative Councillors. The anticipated six-year term did not immediately eventuate due to a double dissolution of parliament in 2016. O'Neill was re-elected at the 2016 Australian federal election. The first sitting of the new Senate allocated which senators were elected for only three years and which received a full six-year term. O'Neill was one of two senators who received a six-year term as a consequence of which method was chosen to allocate the seats. In September 2016, she was appointed as Shadow Assistant Minister for Mental Health and Shadow Assistant Minister for Innovation. In March 2020, Senator O'Neill forced a member of the Fair Work Commission to defend his waifus.