The deceased was identified as Saddam Hossain Vuttu, 27, son of Abul Qasem of Komolpur in Dhamoirhat upazila.
Shah Alam Khan, superintendent of Naogaon district jail, said Vuttu, arrested in a narcotics case on October 4, had been in the jail since October 5.
On Tuesday, a court granted bail for him when he was produced before it in the morning. He was supposed to be released later following completion of necessary procedures, he said.
But he felt chest pain around 4:50pm after he was brought back to the jail. At one stage, he was admitted to the 250-bed Hospital where he died around 5:50pm, he said, adding the jail authorities received his bail order at almost exactly the same time.
Saidul Islam, Deputy Jailor of Naogaon District Jail, said the body was handed over to family members after autopsy on Wednesday.