The 21-year-old forward, selected by San Jose in the sixth round (No. 182) of the 2018 NHL Draft, completed his junior season at the University of Massachusetts Amherst, when he led the NCAA with 27 goals, breaking UMass' Division I single-season record.
Leonard, who led UMass with 37 points in 33 games, is a top 10 finalist for the 2020 Hobey Baker Award, given to the player voted the best in NCAA men's ice hockey.
"John is a high-end shooter who is creative with the puck," Sharks general manager Doug Wilson said. "He took big steps in both his fitness level and all-around game and became one of the most dominant offensive players in college hockey this season. We are excited to see his continued growth as a member of the Sharks organization."
As a sophomore, Leonard scored 40 points (16 goals, 24 assists) in 40 games to help UMass advance to the NCAA championship game, which it lost to Minnesota Duluth 3-0. Sharks rookie defenseman Mario Ferraro was a teammate.
Leonard scored 105 points (56 goals, 49 assists) in 106 games in three seasons with UMass. He is the sixth UMass player to score at least 50 goals and 100 points, and the first to do so as a junior in its Division I history.