Song had been in Africa talking with key figures in Cameroon’s football federation having been left out of coach Volker Finke’s plans since his sending off against Croatia at the World Cup in Brazil.
The talks could have seen Song called into Finke’s squad for the Africa Cup of Nations but his retirement means he should be back with the Hammers squad in plenty of time to prepare for their Premier League trip to Swansea on Saturday.
Song retires after winning 47 caps, although his last action in international football was an elbow on Croatia striker Mario Mandzukic that cost him a three-match ban and hefty fine.
“Since the World Cup in the summer and my subsequent exclusion from the Cameroon squad for the Africa Cup of Nations I have taken the decision to retire from international football,” said Song, who is on loan at West Ham from Barcelona.
“It is true that there were some discussions of late to include me in the squad for this tournament but I feel after a lot of careful thought and numerous discussions with my family this is the right decision.
“My love for my country will never change but I want to take time to focus purely on domestic football and start to rebuild my career at West Ham United.
“I wish Cameroon all the best and the team will always be in my heart.”