NEW YORK -- Alex Rodriguez 's Yankees career will be remembered for its tumult from wire to wire, dizzying highs and rock-bottom lows with just about every imaginable experience in between. The long-running reality saga, filmed in front of one of the world's largest audiences, is now set to air its final episode.

Rodriguez and the Yankees announced on Sunday that the three-time Most Valuable Player will play his last Major League game on Friday against the Rays at Yankee Stadium. Following the game, Rodriguez will be unconditionally released from his player contract in order to serve as a special advisor and instructor for the Yankees through Dec. 31, 2017.

"This is a tough day. I love this game and I love this team, and today I'm saying goodbye to both," Rodriguez said, choking back his emotions in front of a packed news conference attended by all of his teammates. "This is also a proud day. I was 18 when I broke into the big leagues. I never thought I could play for 22 years. At 18, I just wanted to make the team."

:: A-Rod to retire coverage ::

Rodriguez said that it "was the Yankees' decision" that he no longer be an active player, but that he was "at peace with it." His next chapter will include helping a new generation of Yankees, a role that was suggested to Rodriguez last week by managing general partner Hal Steinbrenner. Rodriguez will report directly to Steinbrenner and said that he was "incredibly humbled and flattered" by the offer.

"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," Steinbrenner said in a statement. "We have an exciting group of talented young players at every level of our system. Our job as an organization is to utilize every resource possible to allow them to reach their potential, and I expect Alex to directly contribute to their growth and success.

"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."

Because Rodriguez is being released, he will receive all of the approximately $27 million owed to him through the conclusion of a 10-year contract he signed following the 2007 season.

"He gets everything he deserves, the contract he negotiated in full force," general manager Brian Cashman said. "Every aspect he's owed will be paid as the contract states the rest of the way, without interruption."

Cashman said that Rodriguez would be free to sign with another club, though no club has called the Yankees to discuss interest in a trade for Rodriguez, who has hit 696 home runs, fourth all-time behind Barry Bonds (762), Hank Aaron (755) and Babe Ruth (714).

When asked about the possibility of wearing another uniform, Rodriguez said, "I have not thought past the pinstripes." Rodriguez can also pursue opportunities in the media, something he dabbled with during last year's postseason to acclaim.

Having returned from a historic drug suspension that cost him all of the 2014 season, Rodriguez improbably repaired a litigious relationship with Major League Baseball and the Yankees to enjoy a resurgent 33-homer campaign in 2015. He has hit just .204/.252/.356 in 62 games this year, as his playing time has been drastically reduced.

Facing rumors of an imminent release, Rodriguez last played in the Yankees' 7-1 loss to the Mets on Tuesday, flying out to end the game in his lone plate appearance. Rodriguez has nine home runs this year, having last gone deep on July 18 off the Orioles' Kevin Gausman .

"The last four weeks have not been fun," Rodriguez said. "It's been very painful and embarrassing to sit on the bench. It's been awful. So from that sense, I'm very happy that we found a solution."

Yankees manager Joe Girardi said that he would confer with Rodriguez to plan out the next week. After Sunday's series finale with the Indians (a 3-2 win), the Yankees travel to Boston for a three-game series that opens on Tuesday, then come home for Rodriguez's final game on Friday.

"If he wants to play in every game, I'll find a way," Girardi said.

Rodriguez said that he plans to return home to Miami after Friday's game, then serve as a guest instructor next spring. Cashman suggested that Rodriguez could tutor promising infielders Gleyber Torres and Jorge Mateo, both of whom are with Class A Advanced Tampa. Torres and Mateo are the Yankees' Nos. 2 and 3 prospects, respectively, as ranked by MLBPipeline.com.

"He's already plug-and-play," Cashman said of Rodriguez. "He's exceptional on the baseball end, in terms of the teaching and evaluating side of it. He always has been."

Acquired by the Yankees from the Rangers on Feb. 16, 2004, Rodriguez has hit 351 home runs for the Yankees, ranking sixth in the organization all-time, and won two MVP awards with New York. He ranks third in Major League history with 2,084 RBIs, eighth with 2,021 runs scored and 20th with 3,114 hits.

Asked to describe Rodriguez's legacy with the organization, Cashman removed his 2009 World Series ring and rested it on the table in front of him.

"That doesn't come along to this franchise's trophy case without Alex's contributions," Cashman said.

Rodriguez is the only player to log 14 seasons of at least 30 home runs and 100 RBIs; stats would make Rodriguez a lock for Cooperstown, if not for his cloud of admitted performance-enhancing drug use.

"I do want to be remembered as someone who was madly in love with the game of baseball, someone who loves it at every level," Rodriguez said. "Someone who loves to learn it, play it, teach it, coach it. And also, I'm going to be hopefully remembered as someone who tripped and fell a lot, but someone that kept getting up."

In his remarks, Rodriguez thanked his mother and daughters for their love and support, as well as the Steinbrenner family for his many opportunities and for the faith that they are showing in him for the future.

"No athlete ever ends a career the way you want to," Rodriguez said. "We all want to keep playing forever, but it doesn't work that way. 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."