In 2011, Cornwell contested the normally safe Labor seat of Charlestown in the Hunter Valley.[8] He defeated Labor incumbent Matthew Morris with a swing of 25.2 per cent and winning the seat with 59.9 per cent of the vote on a two party preferred basis. The swing was all the more remarkable since the seat had been in Labor hands since its creation in 1971.[9] In parliament, Cornwell was appointed the government's chief whip in the Legislative Assembly.[2]
In 2011 Cornwell was appointed to chair the NSW Companion Animal Taskforce charged with reducing the unacceptably high euthanasia rates of unwanted domestic pets and improving control of dangerous dogs. This report resulted in landmark amendments to the Companion Animal Act 1988.[10]
On 6 August 2014, a hearing of the New South Wales Independent Commission Against Corruption (ICAC) revealed that Cornwell had received $10,000 in illegal donations from Newcastle Lord Mayor Jeff McCloy. Following this revelation, Cornwell resigned from the Liberal Party and moved to the crossbench as an independent pending the result of the inquiry.[11] Cornwell has said that before the 2011 election, McCloy, a prominent developer in Newcastle, met him in McCloy's Bentley and gave him the money, which in turn was given to the Liberal Party.[2] Cornwell also admitted to the ICAC that his wife had received $10,120 from developer Hilton Grugeon, ostensibly for a painting given to the developer in 2010 which was worth much less. The money was used to pay Cornwell's PAYG tax.[12] On 8 August 2014, Cornwell announced that would not contest his seat at the next NSW election,[3] yet by 12 August he had resigned from parliament with immediate effect.[4] As an "explicit act of atonement" for the actions of Cornwell and others, the Liberals opted not to contest the ensuing 2014 Charlestown by-election,[5][6] which saw Labor reclaim the seat.
On 30 August 2016, the Independent Commission Against Corruption released its report into the investigation into illegal developer donations. It found that Cornwell had "Acted with the intention of evading laws banning political donations from property developers, and requiring the disclosure of donation" and also recommended that the Director of Public Prosecutions charge Cornwell and his wife with "giving false and misleading evidence"[13]
In October 2018 Andrew Cornwell was "exonerated by the Independent Commission Against Corruption over perjury allegations."[14] "ICAC announced this week that it had accepted the advice of the Director of Public Prosecutions that there was insufficient evidence to charge Mr Cornwell with giving false or misleading evidence to the 2014 Operation Spicer." The DPP advised the ICAC the previous year that "it would not pursue perjury charges against Ms Brookes."[14]
In November 2019 Mr Bruce McClintock SC, Inspector of the ICAC released a report into the conduct of counsel assisting towards Andrew Cornwell, Michael Gallacher. In his report he found that Watson’s conduct was “inappropriate” and “unfair” and caused “considerable damage to the public standing of the commission”. On May 19, 2020 McClintock also described Watson’s conduct towards Cornwell and others as “beyond regrettable”.[15][16]
Following the resignation of Premier Gladys Berejiklian, Cornwell called for reform of the ICAC for “allowing mud to stick even when allegations are never proven”. He stated that it “had taken four years and hundreds of thousands of dollars to clear his name”.[17]