The girl's screams alerted nearby workers, who saw her hanging from the building in the city of Meizhou.
One of the good Samaritans climbs over the handrailing and carefully edges close to the window where the girl is trapped.
He manages to pull her up, taking some of the pressure off the youngster's head, while the second man approaches and cuts her free.
As the startling scene unfolded, an onlooker thought to fetch a quilt from his home and asked three others to help unravel and hold it below, in case the girl fell, Asia One reported.
It took more than one hour to free the girl, who was not physically harmed in the incident.
Follow Emirates 24|7 on Google News.