The rescued miners, all in a poor state of health, were rushed to a local hospital. One miner is still missing, the agency said.
The flood at the mine, located in China's Henan Province, occurred on Monday morning when 42 people were working underground. Eight managed to escape.
The search for the missing miner is continuing, the agency said.
Local industrial safety authorities told the agency the mine was operating illegally.
"Although the mine's production license is valid until November 2009, the mine was undergoing a technical innovation for expansion, which has yet to be approved for resuming production," an official was quoted by Xinhua as saying.
China's mining industry is considered one of the world's most dangerous, with accidents killing up to 7,000 workers annually. A major gas blast at Liaoning's Sunjiawan mine in February 2005 killed more than 200 miners, making it the worst mining tragedy in China for at least 15 years.