Harvey addressed his decision in an Instagram post, sharing a photo from an April 2013 appearance with the Mets and discussing how he "pitched to win. To fire up my team and more importantly, to fire up the fans in a city that I've always loved."
"With all the amazing memories came a lot of injuries and tough times," Harvey wrote. "The realization that those amazingly powerful moments that make me thrive as a pitcher and help my teammates and city win are no longer possible.
"Believe me I wish I could have done more and brought more of those amazing moments back to life. I have to say this is my time to say thank you, and goodbye."
Harvey, 34, had not pitched in the major leagues since 2021 with the Baltimore Orioles. He served a 60-game suspension at the start of the 2022 season for distributing a prohibited drug of abuse in violation of MLB's drug program, then spent the season pitching at three levels of the Orioles' minor league system.
Harvey became a free agent after the 2022 season but went unsigned. Harvey made two starts for Italy during the World Baseball Classic this year, going 1-0 with a 1.29 ERA.
Harvey was a budding star for the Mets early in his career. He was selected seventh overall in the 2010 amateur draft, debuted in the major leagues in 2012 and made his only All-Star appearance and finished fourth in National League Cy Young Award voting as a 24-year-old in 2013, when he also received his "Dark Knight" nickname. After Tommy John surgery, he helped pitch the Mets into the World Series in 2015.
He never found the same heights again, however, posting a 5.92 ERA in 539⅓ innings while pitching for the Mets, Cincinnati Reds, Angels, Kansas City Royals and Orioles from 2016 to 2021. Health woes, including thoracic outlet syndrome, contributed to Harvey failing to recapture his early career magic.
Harvey, who retires with a career record of 50-66, a 4.42 ERA and 687 strikeouts, closed his post by thanking the fans for their support.
"To the fans, most importantly the NY Mets fans: you made a dream come true for me. A dream I never could have thought to be true. Who would have thought a kid from Mystic, CT would be able to play in the greatest city in the world, his hometown. You are forever embedded in my heart."
Information from ESPN's Alden Gonzalez and The Associated Press was used in this report.