Irish international McCarthy, had been considering joining Barnsley in a similar deal but the Owls have beaten the Tykes to his signature.
Macca told the Sheffield Wednesday official website: "It's good to complete the deal.
"Wednesday were interested in me a couple of weeks ago but there were a few problems between the two clubs and the deal wasn't put together.
"I was keen to come here on loan as my opportunities where limited at Birmingham.
"Steve Bruce has brought a lot of new players in and I now have a chance to play first team football here."