Mr Perrottet, 41, had also served as Treasurer, Minister for Industrial Relations and Minister for Finance, Services and Property in the former coalition government.
"I love NSW," he said in a statement on Friday.
"It has been an absolute honour to represent the eight million people who call this great state home, especially as their 46th premier."
At age 39, Mr Perrottet became the youngest premier in the history of NSW.
Mr Perrottet, who is giving up his lower house seat of Epping, has previously been touted as a possible Liberal candidate for a seat in federal parliament.
His departure sets the scene for NSW Liberal party to face two by-elections, following the recent resignation of Matt Kean, MP for Hornsby, who was treasurer in Mr Perrottet's government.
"I got into politics to promote ideas and new ways of thinking and I am proud to have been part of a government that left NSW in a much better place than we found it," Mr Perrottet said.
Dominic Perrottet with his family during a campaign rally for the 2023 state election. (Jane Dempster/AAP PHOTOS)
He plans to give his valedictory speech when state parliament returns in August, ahead of formally resigning to the Speaker of the Legislative Assembly on August 11.
Opposition Leader Mark Speakman said Mr Perrottet, who was premier for three years, had left an indelible mark on NSW.
"He was a reformer who had a passion for new ideas and imagination for what would make NSW a better place for all," he said.
Mr Perrottet had delivered five budgets with strong surpluses and record infrastructure investment, drove the state's asset recycling program and established the NSW Generations Fund, now valued at more than $17 billion.
"His legacy is one of remarkable achievements and steadfast leadership," Mr Speakman added.