Ramesh was arrested only two days ago on charges of abduction and rape, District Magistrate incharge Udayraj Singh said.
His body was found hanging from the ceiling of a toilet inside the jail premises when Chief Judicial Magistrate Punit Kumar Gupta came to inspect the jail.
A magisterial enquiry would be conducted in the matter, Singh said.