Saman Gunan, 38, lost consciousness on his way out of the Tham Luang cave complex after delivering supplies and could not be revived.
"His job was to deliver oxygen. He did not have enough on his way back," said an official.
The diver had left the navy but returned to help the rescue operation.
Mr Gunan, said to be an avid runner and cyclist, was part of a massive rescue operation which started almost two weeks ago after the group went into the Tham Luang cave.
Chiang Rai Deputy Governor Passakorn Boonyaluck told reporters at the rescue site that he had died in the early hours of Friday morning.
Around 1,000 people are involved in the rescue operations, including navy divers, military personnel and civilian volunteers.
Mr Gunan's death has underscored the dangers behind the search efforts.
Thai Seal commander Apakorn Yookongkaew said the team still had "faith" to carry out their work.
When asked how the group could make it out safely if an experienced diver could not, Mr Apakorn said they would take more precautions with the children, who are aged between 11 and 16, and their 25-year-old coach.
Air supply concerns
Authorities now say there are further concerns about falling oxygen levels in the cave where the boys and their coach are trapped.
Oxygen levels were being depleted by the large number of people working inside the cave network, said Chiang Rai Governor Narongsak Osotthanakorn.
Authorities are now working to get a 5km (3 mile) cable into the cave to supply the group with air.
The group were finally reached by two British rescue divers late on Monday, nine days after they entered the caves. They had been trapped by rising water while exploring.
They are reported to be in good health, and are now being regularly supplied with food and medical care.
Rescuers are still trying to work out how best to bring them all to safety, with officials stressing they do not intend to take any risks with the boys' safety.
If water levels rise higher, they will have to learn how to use diving equipment or wait months until the rainy season ends.