By Brandon Griggs and Euan McKirdy

PHILADELPHIA (CNN) — Alex Rodriguez’s turbulent career as one of baseball’s most talented and polarizing sluggers appears to be over.

The New York Yankees announced Sunday that A-Rod will play in his final major league game Friday at Yankee Stadium as the Yankees take on the Tampa Bay Rays. After the game, the 41-year-old Rodriguez will be released from his player contract and become a special adviser and instructor with the Yankees through December 31, 2017.

“I love this game and I love this team,” an emotional Rodriguez said at a press conference at Yankee Stadium. “Today, I’m saying goodbye to both. I never thought I could play for 22 years.”

The three-time MVP nears retirement with 3,114 hits and 696 home runs, good enough for fourth on the all-time homer list behind Barry Bonds (762), Hank Aaron (755) and Babe Ruth (714). He was voted to the All-Star Game 14 times and signed a $275 million contract with the Yankees in 2007 — then the richest deal in baseball history.

But Rodriguez’s gaudy stats were tarnished in the eyes of many by his admission in 2013 that he had used performance-enhancing drugs. He was suspended for the final weeks of that season and all of the 2014 season before rejoining the Yankees last year.

Once one of the game’s most feared hitters, A-Rod slumped badly this season as his skills seemed to desert him. He is hitting .204 with just nine home runs and has spent much of the season on the bench.

“No athlete ever ends his or her career the way you want to. We all want to play forever. But it doesn’t work that way,” he said in a statement Sunday. “Accepting the end gracefully is part of being a professional athlete. Saying goodbye may be the hardest part of the job, but that’s what I’m doing today.”

Under the terms of his 2007 contract, Rodriguez is owed the remainder of his $21 million salary this season, plus another $21 million next year.

“After spending several days discussing this plan with Alex, I am pleased that he will remain a part of our organization moving forward and transition into a role in which I know he can flourish,” Yankees Managing General Partner Hal Steinbrenner said Sunday. “Baseball runs through his blood. He’s a tireless worker and an astute student of the game. Alex has already proven to be a willing and effective mentor to many players who have come through our clubhouse, and I am confident that this next phase of his baseball life will bring out the best in Alex and the next generation of Yankees.”

The Yankees said Rodriguez will report directly to Steinbrenner and will be assigned to work with players at all levels of the team’s farm system, including many of the club’s top prospects.

The first overall pick in the 1993 MLB draft, Rodriguez was signed straight out of his Miami high school and began his major league career the following year — at age 18 — as a shortstop with the Seattle Mariners. By 1996, he was arguably the best young player in baseball. After seven years in Seattle he left as a free agent to sign a lucrative contract with the Texas Rangers, where he played three seasons before the Yankees came calling.

When he joined the Yankees Rodriguez moved to third base to accommodate popular teammate Derek Jeter, who played shortstop.

In 2007 Rodriguez became the youngest-ever MLB player to hit 500 career home runs. When he renegotiated his contract that same year, the $275 million, 10-year deal was the sport’s largest.

In his 12 seasons with the Yankees A-Rod reached the playoffs nine times, and the Yankees won the World Series — his only title — in 2009.

He’s currently the only active player in the 3,000 club — that exclusive group of players with more than 3,000 career hits — although Miami’s Ichiro Suzuki notched his 2,999th hit Saturday night and is poised to join him. He also is the only major leaguer ever to have 14 seasons of at least 30 home runs and 100 RBIs.

Sunday’s news came on the heels of teammate Mark Teixeira’s announcement Friday that he will retire at the end of the season.

(The-CNN-Wire ™ & © 2016 Cable News Network, Inc., a Time Warner Company. All rights reserved.)