The union representing prison workers claims the governor acted improperly in ordering the closure of the Dwight and Tamms correctional centers to help balance the state's budget.
AFSCME council 31 says the closures would create safety concerns at other prisons when inmates are transferred.
A judge agreed.
The governor office is planning to appeal Wednesday's ruling.