Citing safety concerns, the judge issued the injunction in Alexander County. It replaces a temporary restraining order he issued last month, and requires the prisons to remain open while the administration and a union go through arbitration.
The injunction covers Quinn's plan to close prisons at Dwight and Tamms, as well as three halfway houses and two youth prisons.
Aides say Quinn plans to appeal the judge's decision.
Legislators provided money to keep the facilities open, but Quinn vetoed the funds, saying he says the money should be spent on education.