Wigan recently ended their interest in McDonald because of Celtic's asking price and West Ham had enquired about the player.
Gordon Strachan, who took over at Boro in October, bought McDonald for £700,000 from Motherwell, for whom he had starred for three seasons.
The striker will join former Celtic players Stephen McManus, Willo Flood, Chris Killen and Barry Robson at the Championship club and could partner Lee Miller up front after his move from Aberdeen.
McDonald, who has earned 15 caps for Australia, arrived in British football from Cranbourne Comets.
He made only a handful of appearances in brief spells with Southampton, Bournemouth and Wimbledon - and also served Huddersfield on loan.
McDonald scored 64 goals in 127 appearances for Celtic and will be keen to start hitting the net regularly to clinch his place in Australia's squad for the World Cup finals in South Africa this summer.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.