O'Connor has signed for Barnsley until the end of the season after two loans spells at Oakwell.
The Scotland international was given only a six-month contract by Blues last summer after undergoing operations on both hips. That deal expired on Sunday and now O'Connor has made permanent his move to the Championship club.
McLeish said: "We wish Garry well and it's great for him that he has signed a deal with Barnsley.
"He is a good player and it is unfortunate Birmingham fans never got the chance to see the very best of him during his time here.
"They saw flashes of it with some of the performances he put in and important goals scored, particularly in the promotion season."