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.”
Another West Ham player who looks to be out of the Africa Cup of Nations is striker Diafro Sakho.
Sakho, the Hammers’ top goalscorer this season,??has been struggling with a back injury since November.
He has now been assessed by Senegal and West Ham boss Sam Allardyce does not think he will go to the tournament in Equatorial Guinea.
Allardyce said: “Sakho???s got a damaged back, he???s got a pinched spine. Senegal have sent a medical team over and looked at the MRI scans with us and he will be out for a few weeks, I think.”