The man had been surfing alone at Karekare Beach today when he lost his board and was swept into the rocks by large waves.
He tried for two hours to walk out of the beach through the bush tracks but he was unable to.
Out of desperation, he wrote his message in the sand at Mercer Bay, hoping someone would see it.
And someone did.
A woman on a walking track spotted him writing the message before he collapsed.
She called the United North Piha Surf Club around 3.30pm.
A Surf Life Saving Rescue jetski was sent from Piha with two lifeguards and first aid equipment to conduct a search.
On arrival the lifeguards located the surfer and realised he had serious injuries.
The lifeguards provided emergency first aid before transporting the man back to Piha, where an ambulance had been organised to meet them at the surf club and later transported him to hospital.
Around 5pm the man's wife reported him missing to police after she hadn't heard from him.
Surf Life Saving's rescue communications centre SurfCom confirmed that the patient the lifeguards were treating was the missing person with the news conveyed to his family.
Search and Rescue supervisor John-Michael Swannix said the man was very lucky.
"The message in the sand is not visible from the walking tracks at the northern end of Mercer Bay, so it was very lucky the informant and her friend were at the southern end and able to see it.
"With Auckland in alert level 3, not as many people are out and about at the moment so it's also lucky someone was walking the track at that time."
Swannix said with Covid alert levels going back to level 2 people should always go surfing or swimming with someone else.
"It just means there is someone there to look out for you or to get help if something does go wrong.
"We have 17 Emergency Callout Squads from Ahipara down to Raglan who are available 24/7 to respond to incidents like this. If someone is in trouble, people just need to call 111 and ask police for the surf lifeguards."
Weekday patrols at Ōrewa, Bethells, North Piha and Raglan wrap up at the end of this week, with daily patrols at Muriwai and Piha continuing until the first week of March.