The former Manchester United forward joined Orlando in 2019, having left Serie A club Lazio.
Nani led the club to its first post-season appearances, while Orlando also reached the final of the MLS Is Back Tournament in 2020.
The 35-year-old scored 12 goals in his first season with the Lions, a further nine in 2020 and 10 this season as Orlando lost in the first round of the play-offs, going down 3-1 to Nashville SC.
He explained it was not his decision to leave, but rather Orlando choosing not to extend his contract.
In a statement posted to his official social media channels, Nani wrote: "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."