The little boy named Wenbo was rescued by neighbours earlier this week after getting stuck against the wall in the city of Shishi, in Fujian Province, China.
Wenbo's father, Wang Zhicheng, left for work while his son was napping, thinking the boy would be asleep till the time he was out.
However, the boy woke up before Zhicheng could return and somehow managed to open one of the windows of their apartment, media reports said.
Neighbours in the apartment complex were alarmed to hear the boy's desperate cries.
More From This Section
"Looking out, I was terrified to see a boy was struggling in the air, with his head stuck behind the air conditioner," a neighbour said.
The neighbours rushed to save the struggling Wenbo, breaking into his apartment.
One of the neighbours grabbed the boy's head, preventing him from slipping down further.
After around 40 minutes, Wenbo was finally rescued.