"Andrew is a player that plays with an edge, can kill penalties and has the ability to play the North-South game we desire," said Sharks GM Doug Wilson. "He always competes hard as is always there for his teammates.
In 135 career regular season NHL games with San Jose, Desjardins registered 23 points (seven goals, 16 assists) and 112 penalty minutes.
Sheppard, 25, tallied one goal, three assists and 12 penalty minutes in 32 games with the Sharks this year.
"James played his best hockey for us in the playoffs and his game continues to improve after missing the past couple seasons," said Wilson. "He's got good size and strength and we think he can elevate his game to an even higher level."
Sheppard has appeared in 256 career NHL games with Minnesota and San Jose, recording 12 goals and 41 assists for 53 points, and 120 penalty minutes.
He was originally selected ninth-overall by Minnesota in the 2006 NHL Entry Draft.