NSW Premier Gladys Berejiklian has resigned, after the state's corruption watchdog revealed it was investigating her.

The ICAC will hold public hearings later this month to investigate whether there was a conflict between Ms Berejiklian's public duties and private interests when she was in a personal relationship with then-MP Daryl Maguire.

Ms Berejiklian conceded her shock announcement comes amid some of the "darkest days in the state's history".