Announcing his decision at a press conference on the eve of Sweden's final group game against Belgium, the 34-year-old added that he would not be taking part in the Rio Olympic soccer tournament in August as an over-age player.
Sweden must beat Belgium on Wednesday to have a realistic chance of qualifying for the round of 16.
"The last game (at Euro 2016) will be my last for Sweden, so I hope it will not be tomorrow," he said, addressing the conference in English.
"To finish with a disappointment -- never."
"I am very proud of what I have achieved and, wherever I go, I will always bring the Swedish flag with me. Disappointment doesn't exist, only pride. I'm very grateful to all the supporters."
Ibrahimovic, who has been reported to be set to join Manchester United in the English Premier League next season from Paris Saint Germain, has had a disappointing tournament so far.
He has not yet had a shot on target as Sweden have taken only one point from their opening two games in Group E.
He made his international debut against the Faroe Islands in 2001, played at the 2002 and 2006 World Cups and has been in their squad at four European championship tournaments.
IMAGE: Zlatan Ibrahimovic
Photograph: Anders Wiklund/TT News Agency/Reuters.
Ibrahimovic will sign for Manchester United - Sky sources
Ibrahimovic bids farewell to PSG with French Cup win
PHOTOS: This is how football fans should be!
Meet the surprise package of Euro 2016
Euro 2016: Irish hopeful of memorable win against Italy