The team did not announce financial terms of the deal, but a source told ESPN.com's Pierre LeBrun that it's worth a total of $5.9 million ($2.9 million next year, $3 million in 2015-16).
McGinnn, who turns 26 in August, would have become a restricted free agent July 1 after earning $1.85 million this past year, when he put up 19 goals and 19 assists in 79 games for Colorado.
He also had three game-winning goals.
Avalanche executive Joe Sakic said McGinn "played an important role for our team" as they made the playoffs for the first time since 2009-10.
McGinn was acquired by Colorado in a trade with San Jose on Feb. 27, 2012.
Information from the Associated Press was used in this report.