Hartman's pursuit of an NHL career began when he left West Dundee, Illinois, at age 15 to join USA Hockey's National Team Development Program in Ann Arbor, Michigan. After two seasons with the NTDP, Hartman chose to play for Plymouth of the Ontario Hockey League over Miami University in Ohio. He spent two seasons with Plymouth (2012-14), and won a gold medal with the United States at the 2012 IIHF Under-18 World Championship and again the following year at the IIHF World Junior Championship.
Selected by the Chicago Blackhawks with the No. 30 pick in the 2013 NHL Draft, Hartman signed a three-year, entry-level contract Nov. 18, 2013. He made his NHL debut Feb. 13, 2015, at home against the New Jersey Devils, and played five NHL games in 2014-15. Hartman played three NHL games the following season, getting his first NHL point Nov. 4, 2015, when he had an assist at home against the St. Louis Blues.