With Jason Blake off on a holding penalty, Joe Thornton created a screen in front of Ducks goalie Ray Emery and Setoguchi's blast from the right circle found the net, breaking a 2-2 tie with less than 6 minutes left.
Antti Niemi turned aside 20-of-22 shots for the victory.
Bobby Ryan and Lubomir Visnovsky scored for seventh-seeded Anaheim, which was seeking to clinch a playoff spot with a win.
Visnovsky left the game after a third-period hit from San Jose's Douglas Murray and didn't return.
Emery finished with 29 saves for the Ducks.
Notable deaths of 2014 [PHOTOS]