McIlrath was drafted 46th overall by the Moose Jaw Warriors in the 2007 bantam draft of the Western Hockey League (WHL). He started his WHL career with the Warriors during the 2008–09 season, playing in 53 games and scoring one goal. In 2009–10, McIlrath improved, along with the Warriors as a whole, and scored seven goals while playing in 65 games. He attracted notice from professional scouts due to his NHL draft eligibility, and was selected to play for Team Orr at the 2010 CHL Top Prospects Game. The highlight of this game for McIlrath was a convincing victory in a fight against Team Cherry's Alex Petrovic. During the Warriors' seven-game playoff series against the eventual WHL champions, the Calgary Hitmen, McIlrath played every game and recorded an assist.
Professional
On March 17, 2011, McIlrath signed his first National Hockey League (NHL) contract with the New York Rangers, the team that drafted him 10th overall in 2010.[3] He played two regular season games at the end of the 2010–11 season with the Rangers' American Hockey League (AHL) affiliate, the Connecticut Whale, in which he did not register a point but accumulated seven penalty minutes. After Moose Jaw was eliminated from the WHL playoffs at the end of the 2011–12 season, McIlrath once again joined the Whale.[4] After Connecticut was eliminated from the AHL playoffs, McIlrath was added to the New York Rangers' roster for the 2012 Stanley Cup playoffs.[5]
After spending the 2012–13 season in Connecticut, McIlrath was again added to the Rangers' playoff roster.[6] On December 11, 2013, he was recalled to the Rangers for the first time during the NHL regular season.[7] He made his NHL debut on December 12, against the Columbus Blue Jackets.[8]
After a strong pre-season showing, McIlrath was named to the full 23-man roster on October 2, 2015,[citation needed] and on December 15, scored his first NHL goal.[9] McIlrath played a total of 34 games for the Rangers in the 2015–16 season, recording two goals and two assists, also accumulating 64 penalty minutes. His most notable fight of the season was on Valentine's Day against Philadelphia Flyers forward Wayne Simmonds, who had punched and concussed Rangers' captain Ryan McDonagh in an earlier (February 6, 2016) game between the two teams.[10]
McIlrath had a poor training camp in 2016 and spent the early part of the 2016–17 season as a reserve defenceman, only making one appearance with the team before he was placed on waivers on October 27.[11] He was reassigned to play four games in the AHL with the Hartford Wolf Pack before he was traded by the Rangers to the Florida Panthers in exchange for Steven Kampfer and a conditional seventh-round pick on November 8, 2016.[12] After five games with the Panthers, and stints in the AHL with affiliate, the Springfield Thunderbirds, Mcllrath was traded for the second time within the season by the Panthers to the Detroit Red Wings along with a conditional third-round pick in the 2017 NHL entry draft in exchange for Thomas Vanek on March 1, 2017.[13][14] He was assigned to the Red Wings' AHL affiliate, the Grand Rapids Griffins.[15] McIlrath recorded four assists in 21 games with the Griffins during the regular season. During the 2017 Calder Cup playoffs, he recorded five assists, and a team-best plus-10 rating in 19 playoff games, and helped lead the Griffins to the Calder Cup.
On June 29, 2017, the Red Wings signed McIlrath to a two-year contract extension.[16] On March 24, 2019, the Red Wings recalled McIlrath from the Griffins. Prior to being recalled, he recorded one goal and eights assists in 49 games, and ranked first on the team in penalty minutes (94) and third in plus-minus (12).[17] During the 2018–19 season, McIlrath appeared in seven games for the Red Wings. Following the completion of the Red Wings' season, he was reassigned to the Griffins.[18] On May 9, the Red Wings signed McIlrath to a two-year contract extension.[19] On January 12, 2021, the Red Wings assigned McIlrath to the Griffins.[20]
On July 28, 2021, McIlrath signed as a free agent to a two-year, two-way contract with the Washington Capitals.[21]
On July 2, 2023, McIlrath signed a two-year, two-way contract extension with the Capitals.[22]