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. He was reassigned to play four games in the AHL with the Wolf Pack before he was traded by the Rangers to the Florida Panthers in exchange for D Steven Kampfer and a conditional 7th round pick on November 8, 2016. 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. He was assigned to the Red Wings' AHL affiliate, the Grand Rapids Griffins. McIlrath recorded four assists in 21 games for 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.