The 34-year-old Sweden striker's contract with the French champions expires in the summer, and he has been linked with Manchester United, Los Angeles Galaxy and AC Milan.
"I am very proud," he said. "I came like a king, I leave like a legend but I will be back."
PSG said Ibrahimovic leaves as "the greatest striker and one of the very best players in the club's history".
Ibrahimovic is the club's record goalscorer despite only joining the club in 2012, his 152 goals coming in 178 appearances.
PSG have won Ligue 1 in every season Ibrahimovic has been at the club, wrapping up the title this season with two months to spare.
"I loved every day I spent here," said Ibrahimovic, who has won league titles with six different clubs. "Paris St-Germain has become a star club in the world and I played a key role moving it forward. It is now the right time for me to take a different path."
PSG host Nantes in Ligue 1 on Saturday before meeting Marseille in the French Cup final on 21 May.
An agreement is in place for Ibrahimovic to return to the club at the end of his playing career, with PSG president Nasser Al-Khelaifi saying he is "looking forward to the prospect of working with him again".
Ibrahimovic finished as top scorer in France in 2012-13 and 2013-14, and leads Lyon's Alexandre Lacazette by 15 goals this season.
He has also been included in the Ligue 1 team of the year in all of his four seasons in France.

Officers searched properties in the Waterfront Park and Colonsay View areas of the city on Wednesday.
Detectives said three firearms, ammunition and a five-figure sum of money were recovered.
A 26-year-old man who was arrested and charged appeared at Edinburgh Sheriff Court on Thursday.

Abdul Hafidah, 18, died in hospital from a stab wound to the neck after the attack in Moss Side.
Police believe he had been chased by a group of men near Greenheys Lane before he was hit by the car and then attacked.
His family said they were experiencing "the most difficult time in our lives".
They added: "Abdul was a composed and caring son, who bought us all so much joy. You felt his presence when he was there and you missed it whenever he wasn't.
"His strength was in his loyalty to his family and friends, and honesty whenever he spoke."
Mr Hafidah's family also urged young people to spend time with their parents and think about the community they wanted to grow up in.
Two men have been arrested on suspicion of murder.
A 17-year-old boy was also arrested on suspicion of attempted murder and later bailed.
Zlatan Ibrahimovic will leave Paris St-Germain at the end of the season.
[NEXT_CONCEPT]
A man has appeared in court after firearms, ammunition and cash were seized by police in Edinburgh.
[NEXT_CONCEPT]
A teenager who was stabbed after he was hit by a car in Manchester was "loyal and caring" and "brought so much joy" to others, his family has said.