Midfielder Shaqiri, who now plays with Chicago Fire in the United States, is Switzerland's second most-capped player after team-mate Granit Xhaka on 130 caps.
The former Bayern Munich and Liverpool player made his international debut in March 2010 aged 18. He represented his country at four World Cups and three European Championships.
In what turned out to be his last game for the Nati, Shaqiri scored in the penalty shoot-out as England beat Switzerland 5-3 on penalties following a 1-1 draw in their Euro 2024 quarter-final in Duesseldorf on July 6.
"Seven tournaments, many goals, 14 years with the Swiss national team and unforgettable moments. It's time to say goodbye to the national team. Great memories remain and I say to you all: thank you!", the winger said in posts on social media.
Shaqiri retires as Switzerland's fourth top goalscorer with 32 goals, behind Alexander Frei with 42 and Kubilay Turkyilmaz and Max Abegglen on 34.