Jeremy Roenick and Joe Pavelski scored the other goals for San Jose, which is three points ahead of Boston in competition for the President's Trophy, which goes to the NHL team with the best regular-season record.
Petteri Nokelainen and Corey Perry scored for Anaheim.
Winning goalie Brian Boucher turned back 19 shots.
Jonas Hiller had 23 saves for the Ducks, who hold seventh place in the Western Conference, two points ahead of Nashville and St. Louis.
2014: The Year in Music [PHOTOS]