The one-way deal carries an average annual value of $890,000 and will pay Primeau $770,000 in 2022-23, $800,000 in 2023-24, and $1,100,000 in 2024-25, the team said in a release.
The move comes one day after centre Kirby Dach signed a four-year deal.
Primeau, 23, will have a chance to compete for more NHL playing time this season behind Jake Allen and Samuel Montembeault. Carey Price is not expected to play this season and may never play again.
Primeau had a 1-7-1 record in 12 games with the Canadiens last season, posting a 4.62 goals-against average and .868 save percentage. He has appeared in 18 games overall in his career.
In the AHL, he had a 16-12-3 record in 33 games for the Laval Rocket, then won nine of his 14 playoff appearances to lead the team to the Eastern Conference Final.