San Jose Sharks legend Patrick Marleau announced his retirement from the NHL after 23 seasons Tuesday, penning his farewell in The Players’ Tribune.

The 42-year-old athlete walks away as the NHL’s all-time leader in games played with 1,779.

"I can’t stress this one enough: thank you to the people of San Jose and the Sharks franchise. I came to San Jose as a 17-year-old boy," Marleau wrote. "I had big dreams and you showed faith in me from day one. Thank you for allowing me to put that jersey on, year after year, decade after decade. I hope I have left a history that you and the city can be proud of."

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Patrick Marleau #12 of the San Jose Sharks and his family wave to the crowd as he is honored for having passed Gordie Howe on the NHLs all-time games played list before the game against the Minnesota Wild at SAP Center on April 24, 2021 in San Jose, California.  (Photo by Brandon Magnus/NHLI via Getty Images)

Selected second overall by the Sharks in the 1997 NHL Draft, Marleau quickly became the face of the franchise and wore the "C" on his sweater from 2003-2009. Over the course of his 21-year career in San Jose, Marleau became the franchise’s all-time leader with 522 goals, 1,111 points, and seven 30-goal seasons, among other accolades.

"Playing in San Jose was the stuff of fairy tales. It was a new team, a beautiful city in California (where the weather was just a smidge nicer than the cold, bitter Canadian air I was used to). I got to play in one of the newest rinks in the league, with loud, passionate fans cheering us on," Marleau wrote. "The horn that goes off when a home-team goal is scored in SAP Center is music to my ears. Our teams were gritty, hardworking, and never stopped fighting until the final buzzer.

"Building those first years of history for the Sharks was a responsibility I didn’t take lightly, or for granted. I hope the city, the organization, and the fans can be proud of what we accomplished then."

Marleau did everything you could do in San Jose alongside fellow team legend Joe Thornton, except win the Stanley Cup. San Jose missed out on the postseason just four times during Marleau’s tenure, but won the Western Conference just once, in the 2015-16 season. San Jose lost the series 4-2 to the Pittsburgh Penguins in the Stanley Cup Final, Marleau’s lone appearance.

Patrick Marleau #12 of the San Jose Sharks prepares for the next play against the Minnesota Wild at SAP Center on April 24, 2021 in San Jose, California.  (Photo by Brandon Magnus/NHLI via Getty Images)

But while Marleau never lifted Lord Stanley’s Cup above his head, he did take home two Olympic gold medals, winning with his native Canada in 2010 (Vancouver) and 2014 (Sochi).

His original run with the Sharks came to an end after the 2016-17 season, when he hit the open market for the first time in his career. Marleau would sign a three-year, $18.75 million deal with the Toronto Maple Leafs, which he said was a "pinch me" moment.

"One of the toughest decisions professionally I ever made was to try something new in the summer of 2017. I moved my family to the center of the hockey universe and put on a Maple Leafs sweater," Marleau wrote. "Playing for the Leafs was surreal. A real "pinch me" moment. My family loved it there, and our boys still want to go back and play on our backyard rink. That opportunity I gave them was like being a kid again.

"But I was now the older veteran on a team full of crazy-talented young kids. Kids like Auston Matthews and Mitch Marner. Kids that are closer to the age of my own sons than to me. Watching them and their love of the game made me fall in love with hockey all over again."

Marleau would have short spell with San Jose again in 2019-20, before being shipped to the Penguins at the trade deadline. But once again, Marleau would make his way back to San Jose for his age-41 campaign in 2020-21, the final season of his Hall of Fame-worthy career. He would finish his career with 566 goals, 631 assists, and 1,197 points.

San Jose Sharks center Patrick Marleau (12) skates up the ice past Anaheim Ducks center Danton Heinen (43) during the third period of an NHL hockey game Wednesday, April 14, 2021, in San Jose, Calif.  (AP Photo/Tony Avelar)

Marleau reached the zenith of his career on April 19, 2021, against the Vegas Golden Knights, when he passed Red Wings legend Gordie Howe for most career games played in NHL history. Mr. Hockey’s record had stood since his retirement after the 1979-80 season when he was 51 years old.

CLICK HERE TO GET THE FOX NEWS APP

Marleau will first be eligible for the Hockey Hall of Fame in 2025, in which he will likely go in as a first-ballot candidate.

"Thank you, hockey," Marleau wrote. "For the lessons. The laughs. The tears. You let me live out my dreams."

New FanDuel Sportsbook users can make their first bet risk-free up to $1,000. If the bet loses, the FanDuel Sportsbook will refund you in site credit. New users can lock in this offer NOW by clicking this link.

Follow Nick Geddes on Twitter @NickGeddesNews and on Instagram @nick.geddes.