Spahic wore the captain's armband as Bosnia-Herzegovina failed to reach the knockout rounds in their debut appearance at the World Cup last month, finishing behind Argentina and Nigeria in Group F.
And the 33-year-old centre-back - Bosnia-Herzegovina's longest serving captain and second-most capped player - announced on Thursday that he was retiring after 77 appearances for the national team.
"I gave it a lot of thought and decided to hang up my national team boots after consultation with my friends and family," Spahic told Bosnian media.
"I am proud to have played in the World Cup with this group and the time has come for younger lads to take over.
"I wish the team all the best in Euro 2016 qualifiers."
Spahic, who made his debut as a substitute against Romania in 2003, stepped down from international duty in an effort to prolong his club career with Bundesliga side Bayer Leverkusen, according to Bosnia-Herzegovina coach Safet Susic.
"Spahic told me after the World Cup he needed a bit of time to make a decision and when he did, he explained that he wanted to focus on his club duties," said Susic.
"I respect his decision. He was a great player and captain for Bosnia and it will be difficult to replace him."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.