Duchene won the overtime's opening faceoff, then scored at the end of a two-on-one with Mike Hoffman that completed the Senators' rally from a pair of three-goal deficits.
The goal ended San Jose goalie Aaron Dell's shot at a seventh consecutive victory.
Duchene finished with two goals and one assist. Hoffman added one goal and three assists, while Mark Stone had a goal plus two helpers for Ottawa.
Tomas Hertl scored two goals for the Sharks, who led 4-1 and then seemed to be in control with a 5-2 edge heading into the third period.
However, Ottawa got 17 shots and three goals in the third period, forcing overtime and setting up Duchene's game-winning shot.
The Sharks started quickly with two goals in the first period and three more in the second.
Hertl started the scoring with a short-handed goal on a breakaway 6:29 into the game. After Ryan Dzingel tied the game for the Senators, Melker Karlsson gave the Sharks the lead later in the period.
Karlsson deflected a Joakim Ryan shot past goalie Craig Anderson with 7:04 left in the first period for a 2-1 lead. Chris Tierney and Brent Burns scored just 1:51 apart early in the second period, stretching the San Jose advantage to 4-1.
Stone and Hertl then traded second-period goals, and San Jose held a 5-2 lead after two.
The Senators' rally began when Derick Brassard scored 26 seconds into the third period. Duchene scored at 8:25 and Hoffman followed by tying the game 5-5 at 10:48.
Burns finished with a goal and an assist while Logan Couture handed out three assists for San Jose. The Sharks (21-12-6) took their second loss in two nights as they fell in a shootout against the Toronto Maple Leafs on Thursday.
The Senators (13-17-9) won for just the fifth times in 23 contests.
Stone now has 12 points in his past 11 games.
Ottawa forward Zack Smith came back after a shoulder injury sidelined him for the past five games.
--Field Level Media
San Jose | Ottawa | |
Logan Couture 3 | Points | Mike Hoffman 4 |
Tomas Hertl 2 | Goals | Matt Duchene 2 |
Logan Couture 3 | Assists | Mike Hoffman 3 |
Brent Burns 1 | Power Play Goals | Mark Stone 1 |
Tomas Hertl 1 | Short Handed Goals | N/A |
Aaron Dell .860 | Save Percentage | Craig Anderson .857 |
Aaron Dell 37 | Saves | Craig Anderson 30 |
Team | Shots | Goals | Power Play | Penalty Kill | Penalty Mins | Face Offs Won |
San Jose | 35 | 5 | 2-3 | 1-2 | 4 | 28 |
Ottawa | 43 | 6 | 1-2 | 1-3 | 6 | 48 |