The baby was rescued from an L-shaped sewer pipe underneath a "squat toilet" in a restroom in the city of Beijing Saturday.
The woman, who was not identified, allegedly cleaned up the scene, then alerted authorities. She did not immediately identify herself as the child's mother. Two days later authorities found baby toys and bloody tissues in the woman's apartment.
She gave birth in the restroom and the baby slipped into the pipe, the woman said. The baby, weighing 6 pounds 3 ounces, was rescued with its placenta still attached.
The infant was hospitalized with abrasions and a low heart rate. It was released late Wednesday to its maternal grandparents. The 22-year-old mother remained under medical care, according to local media reports.
The woman said she had a brief affair with the child's father and reportedly hid her pregnancy from her family. A man claiming to be the child's father has come forward to request a paternity test. He has offered child support.
Firefighters who arrived at the rental building found the infant trapped in an L-shaped section of sewage pipe just below the squat toilet in one of the building's shared restrooms.
In video footage, officials were shown removing the pipe from a ceiling that apparently was just below the restroom and then, at the hospital, using pliers and saws to gently pull apart the pipe, which was about 10 centimeters (3 inches) in diameter.
The Associated Press contributed to this report.