Danilo picked up the injury during training on Thursday, according to ESPNFC report.
Danilo started Brazil’s tournament opener against Switzerland. After that, the Manchester City man missed three matches due to a thigh problem. He recently returned to full training with the squad but injured the ankle during training.
The Brazilian Football Confederation said Danilo would not recover in time to play another game in the tournament.