Madigan's legal opinion Thursday says Gov. Pat Quinn merely needs to follow state law requiring proper public hearings before turning over the mostly empty prison.
Quinn and President Barack Obama have moved swiftly toward using Thomson to replace the Guantanamo Bay detention center in Cuba.
Madigan's opinion was issued at the request of House Republican Leader Tom Cross.
Republicans have questioned whether the state can spare Thomson when its prison system is overcrowded.
Other members of the GOP oppose the sale because they fear having terrorism suspects here makes Illinois a target for attacks.