The Manchester City full-back featured just once for Tite's men in Russia, playing in his team's draw with Switzerland in its opening game.
But a left ankle injury means Danilo, 26, will miss the rest of the tournament, the Brazilian Football Confederation (CBF) confirmed late on Thursday.
"Danilo suffered a left ankle injury and will not have time to recover until the end of the cup," the CBF said in a statement.
"In conversation with the commission, he will remain with the team in Russia. We cheer for your recovery."
Brazil is the favourite to win the World Cup ahead of its quarter-final against Belgium in Kazan on Saturday (NZST).