MacDonald first signed for Heart of Midlothian in 2003, moving from Musselburgh Athletic. A member of the club's under 21 team and having yet to feature for the first team MacDonald was sent out on loan in January 2007 to Queen of the South, in all he was there for 18 months.
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.
He made his European debut on 25 August 2011 against Tottenham at White Hart Lane, conceding a penalty when he felled Harry Kane inside the box. He saved the resulting penalty; the first competitive penalty save of his career. On 27 January 2012 MacDonald signed a new two-year contract extending his stay until 2014, with the club having an option to extend for a further year. In late January with Kello excluded from the squad due to a contract dispute with his contract set to expire, MacDonald began an extended run in the side. He would help the club reach the Scottish Cup final where they faced Edinburgh rivals Hibernian. In the final, MacDonald started in goal, as Hearts beat Hibernian 5–1. As a result of his performance, MacDonald was linked with a move to Bristol City.
The 2012–13 season saw MacDonald play in both legs of Hearts Europa League play-off round matches against Liverpool, including playing in the first leg just 24 hours after becoming a father for the first time. However, Hearts were eliminated from the Europa League after losing 2–1 on aggregate. In a 1–0 loss against Celtic on 7 October 2012, MacDonald was stretchered off after colliding with Charlie Mulgrew. After the match, Manager John McGlynn said he was fine by half-time and was making a recovery despite having been unconscious. MacDonald helped the club reach the Scottish League Cup final after beating Inverness CT in the semi-final, winning 5–4 in a penalty shootout following a 1–1 draw. Hearts went on to lose to St Mirren 3–2 in the final. MacDonald was ever present at the club in the 2012–13 season.
The 2013–14 season would be the darkest time for MacDonald, as Hearts entered administration and were deducted 15 points ahead of the new season. As a result of entering administration, MacDonald took a pay-cut in an effort to help the club survive its administration battle. At the end of the season, McDonald was awarded the Fans' Player of the Year and Players' Player of the Year Award, although the club was relegated. Despite his good personal performances, MacDonald was released by Hearts at the end of the season.
In January 2007, like Robbie Neilson before him, MacDonald joined Scottish First Division club Queen of the South on loan to gain competitive experience. He made his debut on 27 January against Partick Thistle. In all he made 16 appearances in all competitions that season. He earned the SFL Young Player of the Month award for March 2007.
On 10 July 2007 he was sent back on loan to Queens for the new season, making his debut for the second time on 4 August 2007 against St Johnstone. MacDonald established himself as Queens first choice keeper and was an integral part of the team on their run to their first ever Scottish Cup Final. With MacDonald in goal, Queens triumphed in the quarter finals for only the second time in their history despite their previous Scottish Cup quarter final appearances running into double figures. The 2–0 victory against Dundee produced a record breaking 84 yard winner from Ryan McCann. The semi final 4–3 victory against Aberdeen produced another record; the highest scoring Scottish Cup semi final in history.
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.
After leaving Hearts, MacDonald was linked with clubs in Scotland, England, the United States and Sweden. He signed a one-year contract with Falkirk in July 2014.
MacDonald established himself as the number one keeper at Falkirk, and started every single league game of the 2014–15 Scottish Championship campaign. He played 47 matches in all competitions for The Bairns, as they finished fifth in the league table, just outside the play-off positions. This meant he also played every minute in Falkirk's run to the 2015 Scottish Cup Final, and was awarded the man of the match award in the 1–0 semi-final win against Hibernian after a stunning display. Falkirk lost 2–1 to Inverness Caledonian Thistle in the final on 30 May 2015. MacDonald was at fault for the winning goal, as he failed to secure a weak shot. His contract with Falkirk expired at the end of the season and he rejected an offer of a new deal.
MacDonald signed for Premiership side Kilmarnock on a three-year contract on 22 June 2015.
MacDonald made his Scotland under-21 debut on 21 August 2007 against the Czech Republic in an International Challenge Match. In all he made ten appearances for the team between 2007 and 2008.As of 9 September 2017
Heart of Midlothian
Scottish Cup: 2011–12
Scottish League Cup: 2012–13 (Runner-up)
Queen of the South
Scottish Cup: 2007–08 (Runner-up)
Scottish Cup: 2014–15 (Runner-up)