The adult male elephant fell into the well after it became separated from its herd in Hulu village in Ramgarh district late on Saturday.
While most wells are far too narrow for an elephant, some wells in India such as step wells are much wider and set into the ground, particularly on farms where the water is used for irrigation.
Villagers became aware of the animal's plight after hearing a noise early on Sunday as it lay almost submerged in water. They informed local authorities and a rescue mission was launched.
Forest officials used excavators to create a path out of the pond at the bottom of the well, and after three hours managed to move it out of the sludge.
“There were around 10-12 elephants but one elephant fell into a well that was without a parapet wall at around 3am. The herd started making noise … the staff were informed … and we created a path for the elephant using an excavator,” Ved Prakash Kamboj, Divisional Forest Officer, Ramgarh, told The National.
Videos taken on mobile phones show the moment the distressed animal was nearly submerged in the murky waters as officials dug a path. Dozens of locals gathered to watch the rescue work.
After it was hauled out, the elephant was shifted to a nearby jungle.
“It was a difficult operation and it took time because it is a very heavy animal … we had to also handle the crowd gathered,” Mr Kamboj added.
The elephant herd reportedly strayed into the village looking for food over the past two weeks, wreaking havoc by damaging crops.
India is home to the world’s largest population of Asian elephants, a species listed as endangered as their population has massively declined over the years.
India has nearly 27,000 elephants in the wild, according to the last survey conducted in 2017, but their numbers are declining amid the shrinking of forest ranges, encroachment of habitats by human land use and poaching for their body parts.