In all he made 40 appearances that season keeping 12 clean sheets. His final game for Queen of the South came on 24 May 2008 in the Final which ended in a 3–2 defeat to Rangers. Since Rangers had already qualified for the Champions League the runners-up earned the consolation of a place in next season's UEFA Cup. On his return to Hearts, MacDonald said of his time at Queens, "My loan spell last year was good and allowed me to play in big games like the Scottish Cup Final." Queens attempted to bring Macdonald back for a third loan spell in December 2008 but Hearts turned them down as he had now made his first team debut for the club. MacDonald returned to Hearts for the 2008–09 season and, after playing regularly during pre-season fixtures, new manager Csaba Laszlo stated his intent to use him as back-up to first choice keeper Steve Banks. He made his competitive debut for Hearts against, Rangers, on 16 August 2008 at Ibrox. MacDonald had been selected to play following the announcement that Banks had taken up a coaching only role, having previously had a player-coach role. Hearts lost the game 2–0, the second goal a last minute penalty from Kris Boyd, who had scored twice against MacDonald in the 2008 Scottish Cup Final. Manager Laszlo said that he was happy with MacDonald's performance against Rangers but he then dropped him in favour of Slovakian loan signing Marian Kello. MacDonald said that in the absence of first team football, "If there's a chance to go out on loan, and the gaffer agrees, that would be better for me. Then I can come back and show the manager I'm ready to play for Hearts." He stayed at Hearts and in all he made 7 appearances in his debut season, going on to sign a new three-year contract extending his stay until 2012.