Rescue efforts in Fenyang, in the northern province of Shanxi, have been continuing ever since and the two men were retrieved in the early hours of Tuesday, Xinhua added, citing the mining company's rescue headquarters.
They were taken to hospital with non-life-threatening problems and searchers were still trying to reach the remaining 10 miners.
The pair's survival is a stark contrast to the fate of hundreds of Chinese miners every year. Mining accidents are common in the country, which is the world's largest consumer of coal and where mine operators often skirt safety regulations.
In 2012, 1,384 people were killed in coal mining accidents in the country, according to official figures, down from 1,973 in 2011. Some rights groups argue that the actual figure is significantly higher due to underreporting by mining companies.
In an effort to address mine safety concerns, state officials last year moved to shut more than 600 small mines, which are deemed more dangerous than larger ones.
But high-profile accidents have continued this year.
In May, more than 50 miners were killed in two accidental explosions in Sichuan and Guizhou provinces in the southwest, after a blast at a coal mine in the northeastern province of Jilin in March killed 28 people. On the same day a huge landslide crashed down a mountainside in Tibet, entombing 83 workers in two million cubic metres of earth. There were no survivors.
The cause of the flooding in Shanxi has yet not been determined, reports said.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ