A text message from social justice campaigner Richie Hardcore to the prime minister thanked her for granting Czech drug smuggler Karel Sroubek residency.
Jacinda Ardern's office released the text message following pressure from the Opposition last year.
The text message was in response to Immigration Minister Iain Lees-Galloway granting Sroubek residency.
The minister subsequently issued him a deportation notice after new information came to light.
Mr Hardcore's text said he and his friends wanted to pass on their respects and praise for the residency decision and, while Sroubek had made a "bunch of really bad choices", deep down he was a good guy.
Ms Ardern didn't respond to the text, which was sent at the end of October, not long after Sroubek's case hit the headlines and it was revealed Mr Lees-Galloway took less than an hour to approve his residency.
A second text message was also received by Ms Ardern on 9 November from convicted fraudster Alex Swney.
It said: "U r too polite to say it but I will - Bridges & the Nats r being bastards about this Sroubek saga. I want to assist with information I hve included in an email I hve copied u in on. If I can please advise [redacted] ... Best - Alex."
Swney spent time in prison with Sroubek.
The prime minister had a lot of questions to answer, National Party immigration spokesperson Michael Woodhouse said in a statement.
"Why was Sroubek's main supporter texting her directly to pass on his 'respect and praise' over the decision to allow Sroubek to stay in New Zealand in spite of Sroubek's criminal history and the fact he came here on a false passport?'' Mr Woodhouse said.
"Why was one of Sroubek's fellow inmates - Alex Swney - texting and emailing the prime minister information on the case, which has only now been revealed in spite of months of questioning? And what was that information and what is her relationship with Mr Swney?
"The whole thing stinks. Karel Sroubek should never have been granted residency, the government should never have tried to keep it secret, and the prime minister should not be involved in any way in such a decision, especially ones which allowed a convicted criminal to remain in New Zealand."
A spokesperson for Ms Ardern said the government was deporting Sroubek and "Ministers did not have all the critical information when making the first decision, but now that we have all the info he is being deported''.
"This correspondence proves the PM had no involvement in this case or any of the decisions made about it. Text messages to her were sent after the first decision. They were unsolicited and not replied to.
"People write to the prime minister and offer their opinions about government decisions every day. She can't control their opinions but has taken the step of changing the phone number she's had for years, to limit unsolicited contact on her phone."
There had never been an issue with releasing the messages, "but [we] wanted to get guidance from the ombudsman to make sure we don't infringe on others' rights to privacy, the spokesperson said.
"Given that advice we are happy to release them now.''