Had he not signed, O'Brien would have been an unrestricted free agent July 1.
"Having Shane under contract further solidifies our blue line," Avalanche general manager/executive vice president Greg Sherman said. "He brings energy to our lineup and we're pleased to have signed him to a multiyear deal."
O'Brien had 20 points and 105 penalty minutes in 76 games this past season. He also ranked in the top four on the team with 138 hits and 86 blocked shots.