The direction was issued by a division bench comprising acting Chief Justice Ashok Bhushan and Justice A M Shaffique.
The bench also permitted Mukkum Orphanage of Kozhikode and Association of Orphanages to implead in the case.
Earlier, the investigating agency had informed the court its willingness to take over the investigation into the case.
The CBI counsel had stated that considering the vulnerable situation of children and inter-state ramifications of the case, the agency was willing to take up the probe.
The children belonging to extremely impoverised communties were being brought by train for some orphanages run by the Muslim community in Kerala. They were detained at Palakkad when it was found they did not have proper documents.