Agreeing to hear the PIL, a bench headed by Chief Justice H L Dattu sought responses from the governments.
It, however, refused to restrain them from deporting the migrants.
The court passed the order on a PIL filed by NGO 'Joint Action Committee for Bengali Refugee'.
Advocate Dhirendra Kumar Mishra, appearing for the petitioner, submitted that in the name of deporting illegal migrants, the governments are forcing the people, who had come in 1948 and 1971, to go back to Bangladesh.