Non league career MacGillivray began his career as a reserve team goalkeeper for
Harrogate Railway Athletic, After making four appearances for Stalybridge in an injury–hit season, MacGillivray joined
Harrogate Town in August 2012.
Walsall Despite agreeing a two–year deal with Harrogate in November 2012, He acted as a deputy to
Richard O'Donnell for much of the
2014–15 season but MacGillivray eventually made his debut for the Saddlers on 25 April 2015, keeping a clean sheet in a 2–0 victory over
Oldham Athletic. On 20 May 2015, MacGillivray signed a new one-year contract with the club. He made eight appearances in total in 2015–16 as Walsall missed out on promotion via the play-offs and was offered a one-year deal at the end of the season. At the end of the 2016–17 season, Walsall and MacGillivray mutually agreed to end his contract after being unable to guarantee the stopper a regular starting place.
Shrewsbury Town On 5 July 2017, MacGillivray joined fellow League One side
Shrewsbury Town on a free transfer on a one-year deal. He was offered a new contract by Shrewsbury at the end of the 2017–18 season.
Portsmouth On 4 June 2018, League One club
Portsmouth announced that MacGillivray had signed on a two-year deal. MacGillivray made his Portsmouth debut at Fratton Park in their opening league match on 4 August 2018, earning a clean sheet in a 1–0 win over
Luton Town. Later that month he saved 3 penalties in a shoot out versus
Stevenage. On 31 March 2019, MacGillivray started in goal for Portsmouth in the
EFL Trophy final against
Sunderland. MacGillivray made a save in the penalty shootout, saving a spot kick from
Lee Cattermole. Portsmouth went on to win the shootout 5–4 (2–2 after extra-time). MacGillivray won Pompey Player of the Season for 2020–21 In a move described in the media as "surprising" and "controversial", manager
Danny Cowley released MacGillivray at the end of that season. He was also described in the media on his departure as, "Portsmouth's finest goalkeeper for almost a decade." MacGillivray played 135 times in his 3 years at Portsmouth.
Charlton Athletic On 28 June 2021, MacGillivray joined League One
Charlton Athletic on a two-year deal.
Burton Albion On 13 January 2023, MacGillivray joined
Burton Albion.
Milton Keynes Dons On 20 June 2023, MacGillivray free transferred to newly-relegated
EFL League Two club
Milton Keynes Dons. He made his debut for the club in the opening game of the
2023–24 season on 5 August 2023, in a 5–3 away win over
Wrexham. On 8 October 2024 in an EFL Trophy win versus Arsenal under-21s, he repeated his previous shoot out performance of August 2020 by saving three penalties. On 9 August 2025 in 2-0 win at
Barrow, he became the first goalkeeper to achieve six consecutive shut-outs for MK Dons since their 2004 formation. The clean sheet run ended on 19 August 2025 when
Ade Adeyemo scored in first half stoppage time in the 1-1 draw at
Crawley Town. Despite conceding the goal, Sofascore rated MacGillivray's performance in the game at 7.8. ==International career==