Tweed Byron Police District Inspector Matthew Kehoe said a fellow surfer who was mates with the victim as well as another surfer unknown to the pair rushed to the rescue when they saw the Queensland man in distress.
"They fought off the shark," Kehoe said.
"They got him on one of the boards and tried to stabilise him and take him to shore."
The shark followed, circled the three men and rammed one of their boards.
"The actions were absolutely outstanding, they did everything they could to save this guy.
"They put themselves at significant personal risk and we will be recognising those two gentlemen at a later stage for their heroic actions."
Kehoe said the type of shark involved in the attack was yet to be confirmed.
Photos of the bite wounds and a shark still in the area have been sent to NSW Fisheries and the Department of Primary Industry for identification.
Kehoe said he was not aware of any other recent shark attacks in Tweed's history.
The man is yet to be formally identified.
The beach has now been closed for 24 hours.
A surf lifesaver described scenes of locals lining the top of the beach in shock after the fatal shark attack. James Owen, who is also a Tweed Shire Councillor, said the attack happened about 1km north of the Salt club house.
"At the moment we are concentrating on making the beach safe," he said. "It is so awful on so many levels and our hearts are with this man's family and friends.
"Everyone is sensible enough to know sharks are all around and it could happen but this area is not known for shark attacks.
"I think it's going to take a while for the community to process and deal with it all."
Surf lifesavers on jet skis were patrolling the beaches and drones were being used to make sure no one else was in the water as well as looking for more sharks.
"Everyone is doing as much as they can to keep the community calm and support this man's family and friends," Owen said.
Authorities are yet to identify the type of shark but it is understood to be the season when great white sharks are active off that part of the coast.