After the 1995 election, Hartcher was appointed to a number of shadow ministerial portfolios, spending a combined eight years as Shadow Minister for Industrial Relations, five years as Shadow Attorney General, and three years as Shadow Minister for 2000 Olympic Games. On 28 March 2002 he was elected as deputy opposition leader under John Brogden until the 2003 state election. Former PremierBob Carr was often Hartcher's political "sparring partner", a relationship Carr referred to as "good natured fun". Carr nicknamed Hartcher the Swamp Fox – an irreverent reference to US War of Independenceguerrilla commander, Francis Marion – to suggest Hartcher would challenge Brogden for leadership of the party. At the 2003 election Hartcher was challenged in the seat of Gosford by Labor candidate Deborah O'Neill and won by only 272 votes. After narrowly retaining Gosford, Hartcher decided to step down as Deputy Liberal Leader. In 2006, New South Wales Legislative Assembly seats were subject to an electoral redistribution. The seat of Peats was abolished and the majority of the area was redistributed into a newly created seat of Gosford. The majority of the former seat of Gosford was redistributed into the new electoral district of Terrigal. Hartcher was again challenged by O'Neill but was elected Member for Terrigal on 24 March 2007. O'Neill was later elected as the Member for Robertson at the 2010 Federal Election. In 2010, Hartcher was endorsed as the Liberal Party's candidate for Terrigal ahead of the 2011 election. He was elected with a swing of 11.1 points, and won the seat with 74.1 per cent of the two-party vote. His main opponent was Labor's Trevor Drake, who was a former Liberal Party Gosford City Councillor.
O'Farrell Government
On 3 April 2011, Hartcher was appointed by Premier Barry O'Farrell to the Cabinet as Minister for Resources and Energy, Special Minister of State and Minister for the Central Coast. He resigned from Cabinet on 4 December 2013 after the Independent Commission Against Corruption raided his office. In February 2014, the ICAC commenced investigating allegations of electoral funding irregularities. In response to the inquiry, Hartcher, and fellow MPs Chris Spence and Darren Webber, stood aside from the parliamentary party, even though they had just renominated for their seats, to sit as independents. With a final report not released before the 2015 election campaign, Hartcher, Spence and Webber chose to retire and not contest the next election. On 30 August 2016, the ICAC released its report into the investigation into illegal developer donations. It found that Hartcher had "Acted with the intention of evading laws banning political donations from property developers, cap donations and requiring the disclosure of donation" and also recommended that the Director of Public Prosecutions consider laying a charge against Hartcher of larceny. This recommendation related to a cheque for $4,000 made out to the Liberal Party as a donation, but found by ICAC to be deposited into an account controlled by Hartcher and later withdrawn in cash by Ray Carter.