It also asked the authorities of Rangpur prison and Rangpur Medical College Hospital to submit the medical report by next Sunday.
Justice Syed Refaat Ahmed and Justice Md Iqbal Kabir passed the order on Thursday in response to a petition.
In response to another petition, the court has directed the government to take adequate security measures if Mainul is shifted from Rangpur jail to another location. The court will hear the petition on Sunday.
Mainul's wife Saju Hosein filed two writ petitions on Wednesday over the issues. The court has given an interim order on the petitions.
“The way he was attacked under police protection while presenting him before the court has raised questions about his security. Moreover, his physical condition deteriorated since the attack,” Masud Rana, a lawyer for Mainul, told reporters.
On Oct 4, Mainul faced the wrath of the Awami League activists on the premises of a court in Rangpur. He was taken to the court in the northern district from Dhaka Central Jail in Keraniganj for a hearing of his bail petition.
A hoard of cases was started against him across the country. He secured bail from the High Court in some cases, including the one started by Masuda Bhatti, for his defamatory comments.
Mainul, the publisher and editorial board chief of The Daily New Nation, has been facing intense criticism since Oct 16 when he called journalist Masuda a “woman of loose morals” in a talk-show on Ekattor TV.
Mainul is a sponsor of the recently formed Jatiya Oikya Front alliance.