Yesterday, O'Farrell flatly denied suggestions he wrote a letter supporting Australian Water Holdings (AWH) in exchange for Liberal Party donations.
Nor did he recall receiving a bottle of vintage Grange wine, bought for $3000 by AWH and apparently couriered to his home just after the 2011 state election.
This morning the Premier called it a "significant memory failure on my part" and said he will "accept the consequences".
"As someone who believes in accountability, in responsibility I accept the consequences of my action," he said.
"In no way did I seek to mislead wilfully ... the Independent Commission Against Corruption. That would go against everything I am, but this has been a clearly significant memory fail on my part, but I accept the consequences of my actions."
"And that is that as soon as I can organise a meeting of the parliamentary party next week, I will be resigning the position and enabling a new Liberal leader to be elected."
The Prime Minister Tony Abbott addressed the media a short time later telling reporters that Mr O'Farrell "innocently" and "inadvertently misled" the Independent Commission against Corruption.
"I have enormous respect and admiration for Barry O’Farrell," the Prime Minister said.
He referred to the out-going Premier as a "great servant of the Liberal Party".
Prime Minister Abbott said Mr O'Farrell texted him a short time before he announced he would be stepping down, and they had a short phone conversation.
"I said to him that he was acting from high honour, and I just said how sorry I was this wasn’t happening in four years’ time," Mr Abbott said.
"I think he’s been a very capable premier and I think he will be missed."
He said it has been a "long, long time since anyone in Australian politics has acted with this standard of honour and integrity".
Mr O'Farrell was on Tuesday quizzed before the NSW corruption watchdog about a letter he wrote to then-AWH chief executive Nick Di Girolamo in late September 2010.
He agreed it was "broadly supportive" of the company's push to secure a lucrative public-private partnership.
"We can show you lots of money going into Liberal Party coffers which coincides with this letter of support. Did you know anything about that?" counsel assisting Geoffrey Watson, SC, asked Mr O'Farrell.
"No, the Liberal Party's financial code requires members of parliament to be at arm's length from fundraising," Mr O'Farrell replied.
"If your inference is that this letter was signed by me because of donations made by Australian Water Holdings then I reject it completely."
Mr Di Girolamo has told the Independent Commission against Corruption he bought Mr O'Farrell a bottle of Grange wine to express his congratulations on securing the premiership but denied using the gift to "butter Mr O'Farrell up".
The ICAC has heard the 1959 vintage bottle - aged since the year of Mr O'Farrell's birth - was delivered to his home in Roseville, on Sydney's north shore, on or around April 20, 2011.
But Mr O'Farrell said he never received it and that he may have been away on a family holiday to the Gold Coast for Easter when the bottle showed up.
"It's the Don Bradman of wine. Unforgettable," Mr Watson said.
"Yes. If it had been received, I don't believe I would have forgotten it," Mr O'Farrell replied.
The gift was never declared on the premier's pecuniary interests register and ICAC investigators have been unable to find a document from the courier company to show when it was dropped off.
But Mr Di Girolamo has told the inquiry he received a thank you call from the premier after sending the wine - and on Tuesday afternoon, Mr O'Farrell was shown a record of a 28-second telephone call from his mobile number to Mr Di Girolamo's, made about 9.30pm on April 20, 2011.
"I've no knowledge - I don't know about this phone call," Mr O'Farrell said.
"What I do know is if I had received a bottle of 1959 Penfolds Grange I would have known about it and I did not receive a bottle of Penfolds Grange."