The men were trapped by a cave-in at a gypsum mine in eastern Shandong province on 25 December.
China's CCTV showed dramatic footage of one of the men appearing on the surface and then being taken to hospital.
In all, 29 people were initially trapped by the collapse: 15 have now been rescued and one confirmed dead, while 13 are still missing.
The four miners - who were detected more than 200 metres (656ft) below the ground - were led to safety late on Friday; their eyes were covered by masks as they appeared on the surface, reports say.
Local media say the men are being examined in a local hospital.
More than 400 rescue and emergency workers were in the operation.
For several weeks, they were tunnelling down to the surviving men, and water and liquids were passed down through a narrow borehole.
On Friday, the miners were winched up - one-by-one - in a specially made capsule.
Footage from inside the mine earlier showed the four men sitting together. One of them was heard saying: "I feel relieved and secure now. We will remember you (rescuers) forever," CCTV reports.
Local official Zhang Shuping hailed the operation.
"What a relief," he said, adding that the rescued miners were in a stable condition.
Mr Zhang said the search for the miners still missing would continue and rescuers would use light detection equipment to try to locate them.
The mine collapse near the town of Pingyi in December was so violent that it registered at China's earthquake monitoring centre.
Local media later reported that police had enacted "enforcement measures" against several bosses at Yurong company which owns the mine, while local party officials had been sacked.
The company chairman Ma Congbo, drowned himself by jumping into a mine well several days after the incident.
China has a long history of industrial accidents. This incident came days after a landslide caused by construction waste in southern China left dozens of people missing and presumed dead.
The nation's mines have long been the world's deadliest, but safety improvements have reduced deaths in recent years.
Gypsum is a soft sulphate mineral that is used in building and construction.
Four Chinese miners who had been trapped underground for 36 days have been rescued, Chinese state media say.