They completed the sweep thanks largely to Martin Jones.
Jones frustrated the Ducks with stellar plays over the final two periods and Tomas Hertl answered Anaheim's only goal midway through the third with a game-winner just over a minute later, sending the Sharks into the second round with a 2-1 victory in Game 4 on Wednesday night.
''It's tough to play an elimination game when you got an opportunity to sweep a really good team like that,'' San Jose coach Peter DeBoer said. ''You rarely see sweeps. That's because there's so much parity and the other teams are so evenly matched. This is a tough game to play. I thought we had some good moments and some moments we didn't handle well, but we found a way, and that's been the story all year.''
Hertl scored just 1:16 after the Ducks finally got a puck past Jones when he deflected a point shot from Marc-Edouard Vlasic past John Gibson. San Jose then held on to advance to the second round against the expansion Vegas Golden Knights.
Fourth-line winger Marcus Sorensen had a goal for the third straight game to open the scoring for San Jose and Jones did most of the rest of the work with 30 saves. He robbed Corey Perry several times and got help from a replay review that negated an apparent tying goal early in the third.
''When you play a team up against the wall like that you know they're going to come with a push,'' Jones said. ''They gave us everything they had and it was tough but the guys did a great job. We had a couple of huge penalty kills, some huge blocked shots. It was a gutsy way to win there.''
Andrew Cogliano scored the lone goal for the Ducks, who were outscored 16-4 in the series and swept for the first time since 1999 against Detroit. Gibson finished with 22 saves.
''We came at them pretty hard, obviously a couple of bounces here and there and it's a different hockey game,'' captain Ryan Getzlaf said. ''Their goaltender played absolutely outstanding, we just couldn't get it by him.''
Gibson was unable to match the play of Jones, who had a shutout in Game 1, set a San Jose playoff record with 45 regulation saves in Game 3 and posted a .970 save percentage for the series. He was at his best in the clincher that gave the Sharks their second sweep in franchise history after also doing it in the first round in 2013 against Vancouver.
Jones robbed Perry with a pad stop early in the second and then again twice in one sequence later in the period. Anaheim looked poised to capitalize on a late power play in the period but Jones stopped Perry once again with a sprawling pad save.
''It definitely was our best game and it still wasn't enough,'' Perry said. ''You play this way the first couple of games you never know what would happen, that's the frustrating part.''
Getzlaf then finally got a puck past Jones, although it came a fraction of a second after the final buzzer. Referee Eric Furlatt emphatically waved the goal off on the ice and Getzlaf could only lean on the goal in frustration over the failed opportunity.
That frustration only grew as the power play continued into the third period. Rickard Rakell appeared to tie the game with a one-timer but the Sharks challenged the zone entry and the officials ruled Perry and Rakell were offside after video review.
Cogliano finally scored for Anaheim off a feed from Ryan Kesler but the good feeling didn't last long before Hertl responded.
That led to chants of ''We want Vegas!'' and ''Sweep! Sweep! Sweep!'' down the stretch at the sold out Shark Tank.
''Any time you can score a goal after they score one pretty quickly, it kind of deflates their bench,'' forward Logan Couture said. ''We get energy again. It brings energy back in the rink. Definitely felt good.''
Even though the Ducks were the team facing elimination, the Sharks looked more desperate at the start. San Jose got the first seven shots on goal in the game and took the early lead with another contribution from the fourth line.
Sorensen, who spent most of the season in the AHL, took the rebound of Brent Burns' point shot and scored his third goal of the series less than six minutes into the game.
NOTES: Perry had no points in the series. ... Linesman Brad Kovachik left the game in the first period with an injury and was replaced by Mark Shewchyk. ... San Francisco 49ers coach Kyle Shanahan opened the dressing room door to lead the Sharks onto the ice pregame.
More AP hockey: www.apnews.com/tags/NHLhockey
Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.