The remote beach is a popular camping spot but is not patrolled by surf lifesavers.
Paramedics performed CPR on both men, who were believed to be trying to rescue at least one child who had been dragged into deeper water. Neither man could be saved.
Surf Life Saving Queensland (SLSQ) said the tragedy followed a number of serious incidents on the Sunshine Coast on Saturday.
“Our thoughts are with the loved ones of the two men today,” SLSQ’s Sunshine Coast Regional Operations Manager Aaron Purchase said.
The incident was “a tragic reminder to only ever swim between the red and yellow flags, so that if you do get into trouble, lifesavers and lifeguards are there to assist”, he said.
“If you must swim at [a] remote location, stay close to the beach and remain waist-deep. However, the safest place to swim remains at a patrolled location between the red and yellow flags.”
Earlier on Saturday, a woman was rushed to Sunshine Coast University Hospital following an incident at Coolum Beach.