The 34-year-old Bayer Leverkusen defender skippered Bosnia-Herzegovina at this year's World Cup – the independent nation's first appearance on football's biggest stage.
Safet Susic's side failed to progress from the group stages, though, leading to Spahic's initial retirement.
But the defender – who has made 77 appearances for the national team – has changed his mind after watching Bosnia-Herzegovina lose 2-1 at home to Cyprus in their first Euro 2016 qualifier.
Susic said that he had asked Spahic to re-think his decision in a recent phone call, and that after days of deliberation, the veteran had agreed to return.
"Spahic called me to wish us good luck before the Cyprus game," Susic is quoted as telling the Bosnian football association.
"I called him back straight after it [Cyprus game] to ask him to return to the national team.
"He accepted after thinking about it for a few days and will now be a great addition to the squad in our bid to qualify for Euro 2016.
"His departure had left a void at the back and the two young central defenders [Toni Sunjic and Ermin Bicakcic] will perform much better alongside him."
Spahic said when retiring last month that he gave the decision "a lot of thought" and that the "time has come for younger lads to take over".
Bosnia-Herzegovina play crucial Euro 2016 qualifiers against Wales and Belgium next month.
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.