On 27 April 2014, during a match at Villarreal's stadium, El Madrigal, Alves was targeted by Villareal supporter David Campaya Lleo, who threw a banana at him. Alves picked up the banana, peeled it and took a bite. He responded to the incident by saying:
Teammate Neymar's response – to post a photograph of himself on social media also eating a banana – went viral. Other footballers have also since taken photographs of themselves eating bananas. Cyrille Regis, who had been racially abused while a player in the 1970s and 1980s, expressed concern that the viral campaign would detract from the important issues of combating racism in the game. Alves said that whoever threw the banana at him should be publicly shamed, and on 30 April 2014, a man was arrested in connection with the incident. Villareal were later fined €12,000 for the incident.
On 7 May 2014, Alves was named to Brazil's squad for the 2014 FIFA World Cup on home soil. He lost his position as a starter during the competition due to poor performances. After Brazil defeated Colombia 2–1 in the quarter-finals, Alves and teammate David Luiz were applauded for comforting James Rodríguez, an act they were both commended for by both Rodríguez and the media for showing respect.