A High Court bench comprising judges Mirza Hussain Haidar and Mohammad Nuruzzaman issued the rule asking the foreign and home ministries to reply in six weeks why their "inertia should not be declared illegal and contrary to the fundamental rights of the people".
The director general of foreign ministry's South Asia wing and the joint secretary in charge of political desk of the home ministry were also ordered to submit reports on steps they took so far in bringing back the Bangladeshis from the prisons of Andman island.
The court orders came on a writ under public interest litigation filed by a Supreme Court lawyer following a newspaper report.
Approached for comments, home ministry's joint secretary Kamaluddin Ahmed told PTI that their primary investigations found the said inmates in Andaman jail are "non-Bangladeshis" but further enquiries were underway to confirm their identities.
"They are unlikely to be Bangladeshi nationals...we, however, will reply to the High Court rule in due time," Ahmed said.
Bangladesh and India last year signed an agreement that allowed inmates of the respective countries serving jail terms in each others prisons to serve the rest of their terms to jails in their own countries, if they wanted.