They were granted the bail on Tuesday night and released from Avinashi sub-jail on Wednesday.
The issue came to light after a member of a non-governmental organization took video of the two beating up the 18-year-old female elephant, which was chained to a tree, with canes and circulated the same on social media.
After the video went viral, Mettupalayam forest range officer Palaniraja and team had arrested the mahout and his assistant on February 21. They were subsequently remanded in judicial custody and lodged in Avinashi sub-jail.
The two had moved the Mettupalayam judicial magistrate court seeking bail a few days ago. The court granted them bail on Tuesday night and directed them to appear before the office of Mettupalayam ranger to put their signature every day morning for 15 days.