Harpur was born and raised in Niagara Falls and attended A. N. Myer Secondary School. He was originally a left-winger until a minor midget hockey team coach suggested he move to defence. He was drafted by the Guelph Storm as a defenceman in the 3rd round, 43rd overall, in the 2011 Ontario Hockey League Priority Selection. Harpur recorded his first career OHL point, an assist, in a 10-2 win over the Erie Otters on October 1, 2011. Harpur played three and a half seasons with the Storm from 2011 to 2014. After the 2012–13 season, Harpur was selected by the Ottawa Senators in the fourth round of the 2013 NHL Entry Draft. Harpur was traded in the middle of the 2014–15 season to the Barrie Colts. He signed a three-year entry-level contract with the Senators on November 6, 2014.
Professional
Harpur made his professional debut with the Senators' American Hockey League affiliate Binghamton Senators in 2015. During the 2015–16 season, Harpur was called up to Ottawa and made his NHL debut against the Minnesota Wild on March 31, 2016. In the 2016–17 season, Harpur again played most of the season with Binghamton. Harpur was called up to Ottawa for the NHL playoffs and he made his playoff debut on April 17, 2017, against the Boston Bruins. On February 9, 2018, Harpur signed a two-year, $1.45 million contract extension with the Senators. On December 1, 2018, in the first game back for Erik Karlsson since his trade to the San Jose Sharks, Harpur scored his first ever National Hockey League goal on Sharks goaltender Martin Jones. On July 1, 2019, Harpur was traded by the Senators, along with Cody Ceci, Aaron Luchuk and a 2020 third-round draft pick to the Toronto Maple Leafs in exchange for Nikita Zaitsev, Connor Brown and Michael Carcone. Unable to make the Maple Leafs roster heading into the 2019–20 season, Harpur was placed on waivers and re-assigned to AHL affiliate, the Toronto Marlies. Appearing in 33 games from the blueline for the Marlies, Harpur contributed with 1 goal and 11 points. With limited chance to return to the NHL with the Maple Leafs, Harpur was traded to the Nashville Predators in exchange for Miikka Salomaki on February 22, 2020.
Personal life
Harpur was the middle child born to parents Margery and George. His father encouraged him to take skating lessons as a bonding experience. However, his mother was of Australian descent and had never played hockey. She would often put Harpur's equipment on backwards until he learned to dress himself.