He will earn $5.5 million per season.
The 33-year-old Czech had 38 points (7-31) and a plus-22 rating in 75 regular-season games with the Calgary Flames last season. The six-foot-two, 210-pound Hamrlik is a three-time NHL all-star who has 505 career points (131-374) in 999 games.
"Roman Hamrlik established himself as a solid NHL veteran," Habs GM Bob Gainey said in a statement. "The acquisition of Roman fills a very important need in our organization. He is a strong defenceman with a powerful shot and excellent hockey skills. He brings to our club a solid experience and an excellent reputation."