The 26-year-old is earning $950,000 this season and will jump to an average of $3.5 million per year in the deal. He would have been a restricted free agent this summer.
Desharnais has 16 points (8 goals, 8 assists) in 27 games this season. Last season he recorded a career-high 60 points (16-44) in 81 games.
The 5-foot-7 playmaker was signed as an undrafted free agent by Montreal in 2008.
Information from The Associated Press was used in this report.