In an interim ruling, judge Polycarp Hamman said the lecturers should go back to work until the case brought by the government was finalised.
On Monday, hundreds of students blocked the main airport road in Nigeria's commercial capital Lagos to protest against the disruption to classes caused by the lecturers' strike
They threatened to shut a major bridge and port on Wednesday.
The lecturers walked out demanding higher pay and several negotiations with the government have broken down, which forced President Buhari's administration to approach the National Industrial Court.
Strikes over working conditions by public university lecturers are common in Nigeria and often go on for months. The latest action started in February.