The 26-year-old Hartman was eligible to become a restricted free agent with arbitration rights this summer. The deal with an average annual value of $1.7 million will give him the most stability he has had in his NHL career.
In his second season with the Wild, Hartman has six goals, 12 assists and 25 penalty minutes in 40 games. He began as mostly a fourth-line wing but lately has been centering the second line next to standout Kevin Fiala.
Hartman has 57 goals, 70 assists and a plus-16 rating in 354 career NHL games. He signed with Minnesota as a free agent two years ago, after moving from Chicago to Nashville to Philadelphia.