Mr Joyce apologised after learning that the message - sent last year and passed to a former staffer of Scott Morrison's Liberal Party - was being made public.
The text was dated 22 March, before Mr Joyce took on his current role.
Rejecting his resignation, Mr Morrison said: "We all have our frailties and none of us are perfect."
Mr Joyce, 54, told reporters on Saturday: "I want to apologise to the prime minister... I should have never written the text that I did.