The deal is reportedly worth $9.825 million in total.
The 34-year-old veteran, who has a reputation as a clutch playoff performer, was one of the top scoring wingers on the market. He spent the past four seasons playing for the Washington Capitals.
"Joel is a quality veteran player who can score but also plays an extremely hard-nosed brand of hockey," Sharks general manager Doug Wilson said. "He meshes well with our core group of forwards and has a strong track record of playing his best hockey at crucial times of the season."
Ward had 19 goals and 34 points for the Capitals in 82 regular-season games and three goals and nine points in 14 playoff games this spring.
The undrafted right winger had firmly established his position on the Capitals, though he experienced a drop in production last season from his career-best performance in 2013-14 (24 goals, 25 assists, plus-7).
Ward has 97 goals and 123 assists in 517 career games with Minnesota, Nashville and Washington. He also represented Canada at the 2014 world championship, finishing with six goals and three assists in eight games.
The Associated Press contributed to this report.