Sakho was examined by Senegal team doctors on Tuesday and it was decided he would not be fit for the tournament in Equatorial Guinea.
The 25-year-old has had a persistent back injury which flared up again on New Year’s Day when playing for the Hammers against West Brom.
He has been replaced in the Senegal squad by Moussa Konate, 21, from Swiss club FC Sion.
Senegal’s squad left Dakar on Wednesday for a training camp in Morocco, where the fitness of Southampton’s Sadio Mane will also be assessed.
They have warm-up internationals against Gabon in El Jadida on Friday and Guinea next Tuesday in Casablanca.
West Ham boss Sam Allardyce expects Sakho will be out of action for several weeks with the injury.
He 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.”