The 32-year-old defenseman had 35 points (10 goals, 25 assists) in 81 regular-season games with the Anaheim Ducks last season. He led them with 149 blocked shots and was third with 143 hits.
Trouba also scored one goal in 12 Stanley Cup Playoff games. It was Anaheim's first time in the postseason since 2018.
"I think just the talent and the skill," Trouba said of choosing the Sharks. "(Macklin) Celebrini as a player, and how he plays the game, and it's not just the high-level skill and talent. He works hard, he's on pucks, he's kind of a dog out there. That's the kind of guy you want dragging everybody into the fight on your team."
Trouba said the length of the contract also was key.
"[Term is] obviously important," he said. "It's not just me anymore, it's a wife and kids, and that's a decision for the family more than it is just for hockey. I think hockey-wise, this will end up perfectly for me. [It's] also a great place for my family. But term-wise, you don't want to be moving around a whole bunch, as much as you can try to control it or protect it. Term and security means a lot to me and my family, and I'm grateful San Jose is where we ended up."
He also joins a team with a familiar face in Sharks forward Barclay Goodrow. They were teammates for three seasons (2021-24) with the Rangers.
"He's great. Already talked to him this morning," Trouba said. "Very excited to be back with him. I think we had some good times in New York, good seasons, played on good teams. He's one of those guys that brings a lot of the intangibles that you want in a hockey team."
Trouba was selected by the Winnipeg Jets in the first round (No. 9) of the 2012 NHL Draft, and he has 358 points (84 goals, 274 assists) in 906 regular-season games with the Jets, New York Rangers and Ducks. He was voted the Mark Messier NHL Leadership Award in 2024 as "the player who exemplifies great leadership qualities to his team, on and off the ice, during the regular season and who plays a leading role in his community growing the game of hockey."
The Sharks also signed forward Mason Marchment to a five-year, $33.75 million contract ($6.75 million AAV) and goalie Eric Comrie to a two-year, $2.3 million ($1.15 million AAV) contract.
Marchment had 45 points (19 goals, 26 assists) in 45 games with the Seattle Kraken and Columbus Blue Jackets last season. The 31-year-old has 234 points (95 goals, 139 assists) in 370 NHL games with the Blue Jackets, Kraken, Dallas Stars, Florida Panthers and Toronto Maple Leafs.
His father, Bryan Marchment, played parts of six seasons as a defenseman with the Sharks and worked as an amateur scout for team from 2007 until his death in 2022.
Comrie was 12-11-1 with a 3.13 goals-against average and .890 save percentage in 25 games (24 starts) with the Winnipeg Jets last season.
In 102 NHL games with the Jets, Buffalo Sabres, New Jersey Devils and Detroit Red Wings, the 30-year-old is 45-47-4 with a 3.11 GAA, .896 save percentage and four shutouts in 102 games (97 starts).
NHL.com independent correspondent Max Miller contributed to this report