Semyon Varlamov stopped 20 shots, Tyson Jost and Alexander Kerfoot also scored and Nathan MacKinnon had two assists for Colorado. The Avalanche swept the home-and-home series with the Bruins.
Brad Marchand, Tim Schaller and Torey Krug scored for Boston and Tuukka Rask, who was pulled after the second period, stopped 22 of 26 shots. Backup Anton Khudobin was 9 of 9 in the third period.
Colorado erupted for three goals in the second period to take the lead after the teams battled to a 1-1 tie after one. Yakupov got his third of the season one minute into the period to give the Avalanche the lead. Colorado went ahead 3-1 on Andrighetto's power-play goal at 12:37 of the second.
The goal came 44 seconds after Boston defenseman Adam McQuaid went off for cross-checking Colorado rookie Tyson Jost into the boards. Jost left the game favoring his left leg but returned.
Duchene made it 4-1 at 15:43 of the second, his second goal of the season, before Boston rallied.
Schaller scored midway through the third period to make it 4-2, and 1:27 later Krug scored on a power play to make it a one-goal game.
Boston kept up the pressure, but Andrighetto and Jost scored empty-net goals 24 seconds apart to seal it.
Kerfoot's first NHL goal gave the Avalanche the early lead. He skated through the slot as defenseman Tyson Barrie took a shot from the point and deflected it past Rask at 8:19 of the first period.
Marchand tied it right after Boston killed off its second penalty. He outmaneuvered the Colorado defense and beat Varlamov with a high shot to the far post at 17:06 of the first.
NOTES: Boston C Patrice Bergeron (lower-body injury) was scratched and has yet to play this season. He could return for the Bruins' game at Arizona on Saturday. The next game Bergeron plays will be the 900th of his NHL career. ... Avalanche rookie D Andre Mironov was scratched for the third game. Mironov played in the opener against the New York Rangers but has not been in the lineup since. ... Bruins rookie C Danton Heinen was in the lineup a day after being recalled from Providence of the AHL and had an assist for his first NHL point. Ryan White, signed to a professional tryout agreement on Tuesday, was not active. ... The Avalanche are now 14-5-3 in home openers since moving to Denver in 1995.