During her time as leader, she won international acclaim for her handling of a terror attack on two Muslim mosques and the Covid-19 pandemic, and became only the second world leader to give birth while in office.
But her party and personal popularity, often referred to as "Jacindamania", have dropped in recent domestic polls amid escalating inflation and fears of a rising crime rate.
In her first public appearance since parliament went into its summer recess a month ago, she told Labour's annual caucus retreat that she had hoped to find the energy to continue as leader during the break, "but I have not been able to do that".
General election in October
The next general election will be held on Saturday, 14 October, Ardern revealed in her announcement in Napier on the country's eastern coast.
The prime minister said she would continue to serve as an electorate MP until then.
Although recent polls indicate a coalition of the centre-right National and Act parties will win the election, Ardern said that was not the reason for her resignation.
"I am not leaving because I believe we cannot win the next election, but because I believe we can and will," she said.
"I am leaving because with such a privileged job comes a big responsibility. The responsibility to know when you are the right person to lead -- and also when you're not."
Ardern said her resignation would take effect no later than 7 February, and that the Labour caucus would vote on a new leader in three days.
Deputy prime minister Grant Robertson said he would not be putting his name forward.
Australian prime minister Anthony Albanese praised Ardern as a leader who has "shown the world how to lead with intellect and strength."
He said she demonstrated that empathy and insight "are powerful leadership qualities".
Ardern's party has been battling declining trust in government, a deteriorating economic situation, and a resurgent conservative opposition.
The stress has been evident recently, with Ardern showing a rare lapse of poise last month when she was unwittingly caught on a microphone calling an opposition politician an "arrogant prick".