The fire service personnel pulled out the boy from about 20 feet with the help of earth movers and other equipment.
There was a possibility of the child sliding down further. "So we ensured that the boy did not slide down further and then rescued him and given first aid", he said.
The boy was following his father when he slipped and fell in, police said.
The incident comes close on the heels of the death of a three-year-old girl on April 6 after she fell into an abandoned borewell in Villupuram district.