The 35-year-old former Portugal international moved to America in February 2019 and made 77 appearances across all competitions, scoring 28 goals and providing 23 assists.
Nani helped Orlando reach the MLS Is Back tournament final in 2020 and also qualified for the MLS Cup playoffs twice.
In a statement posted to his official social media channels, Nani said: "All good things must come to an end. After three amazing seasons, full of great moments, new friendships and sporting success, I am leaving Orlando City.
"Orlando is a city I can call home, with great people and fantastic supporters, but my contract has ended and there was a decision by the club not to extend it.
"It was an honour captaining the club for its first ever playoff appearances and reaching the final of the MLS Is Back Tournament.
"I shall never forget how the fans and community supported me and my family ever since the moment we arrived in Florida. You will have in me a friend and a fan for the future. I wish you all the best."
"We want to thank Nani for the professionalism that he’s shown in his time in Orlando,” Orlando chairman Mark Wilf said in a release.
“Even in the short time since we’ve taken over as stewards of this great club, we have had great respect for Nani’s passion and abilities, while he led us as captain. We wish him the best moving forward.”
Nani has previously played for Manchester United, where he won four Premier League titles and the 2008 UEFA Champions League. He has also turned out for Sporting Lisbon, Lazio, Fenerbahce and Valencia.