Ms Millane, 22, went missing from a hostel in Auckland on December 1 and a body was found in the Waitakere Ranges on Sunday.
A 26-year-old man, who cannot be named for legal reasons, has been charged with murder and appeared in an Auckland court on Monday.
Speaking to reporters about the death, Ms Ardern said: “I cannot imagine the grief of her family and what they would be experiencing and feeling right now.
“From the Kiwis I have spoken to, there is this overwhelming sense of hurt and shame that this has happened in our country, a place that prides itself on our hospitality, on our manaakitanga (a Maori term meaning kindness and generosity) especially to those who are visiting our shores.”
Appearing to become choked with emotion, the PM added: “So on behalf of New Zealand, I want to apologise to Grace’s family.
“Your daughter should have been safe here, and she wasn’t, and I’m sorry for that.”
Earlier on Monday her alleged murderer, who can not be named, faced court for the first time.
Judge Evangelos Thomas told members of the Millane family, who were in court: “Your grief must be desperate.
“All of us hope justice for Grace is fair, swift and ultimately brings you some peace.”
Documents submitted to the court suggested police believe the University of Lincoln graduate was killed between December 1 and 2, her birthday.
A charge sheet also listed the suspect as living at the hotel where she was last seen alive.
Speaking at the scene on Sunday afternoon, Detective Inspector Scott Beard said investigators had “located a body which we believe to be Grace” about 10 metres from the roadside.
The last confirmed sighting of Ms Millane was at 9.41pm on December 1, the day before her birthday, at the Citylife Hotel, when she was seen with a “male companion”.
Since arriving in New Zealand from Peru on November 20, she had been in near-daily contact with her family.
Police received a missing person report on Wednesday and began a major search and public campaign that saw dozens of calls made to a helpline.
Ms Millane’s father, David Millane, flew to Auckland and made a public appeal for help finding his daughter, who he described as “lovely, outgoing, fun-loving (and) family-orientated”.
Her brother, Declan Millane, paid tribute by sharing pictures on social media of him and his sister, adding the lyrics of You Are My Sunshine.
He wrote on Instagram: “You are my sunshine, my only sunshine. You make me happy when skies are gray. You’ll never know, dear, how much I love you. Please don’t take my sunshine away.”