An astonished passer-by heard crying coming from the primitive shack in rural Kazakhstan and alerted cops.
Dad-of-six Moldagali Orynbasarov, 41, found the infant girl wrapped in a sack and took her out of the loo before the emergency services arrived.
He told local media in the city of Aktobe: "I could hear crying but I couldn't work out where it was coming from.
"Then I walked past the toilet and I thought it couldn't possibly be coming from there - but it was."
Astonishing footage of the inceident shows the sack being cut open to reveal the crying infant, who was then taken by emergency services.
She was treated for hypothermia but is otherwise healthy and weighs in at 3.8 kilos (8lbs 6oz).
The video also shows police with flashlights searching for the child's mother near the shack.
They believe she gave birth to the child without medical aid and abandoned her in the loo to die.
The mother is now being hunted by cops, who say she could face four years in jail for attempted murder.
The case has provoked a furious online response.
One social media user identified as Asyuta said: "Four years for murder is not that much. What a b***h."
Another called Erik added: "This is way too little. They should jail this woman for at least 20 years."