A friendly between AC Milan and Italian lower division club Pro Patria was suspended after players walked off because of racist chants.
Milan's Kevin-Prince Boateng picked up the ball 25 minutes into the first half and kicked it into the crowd.
Ghana international Boateng then removed his shirt and was followed from Pro Patria's home pitch by both sets of players and officials.
There had been appeals for the abuse to stop from the public address announcer.
Boateng later tweeted: “Shame that these things still happen… #StopRacismforever.”
On his way from the pitch, Boateng applauded sections of the crowd, who then reacted angrily towards the corner of the ground from which the chants came.
It was quickly established that play would not restart and AC Milan's official website said other black players in the Milan side – M'Baye Niang, Urby Emanuelson and Sulley Muntari – suffered abuse.
Milan coach Massimiliano Allegri told reporters: “We are disappointed and saddened by what has happened.
“Milan play for the right to respect all players. We need to stop these uncivilised gestures.
“We are sorry for all the other fans who came here for a beautiful day of sport. We promise to return, and we are sorry for the club and players of Pro Patria, but we could not make any other decision.
“I hope it can be an important signal.”
Milan's organising director Umberto Gandini told BBC Sport: “It is so sad but we had to give a strong signal. Very proud of all Milan players for their decision.”
Fellow players, including Manchester City captain Vincent Kompany, threw their support behind Boateng and his team-mates.
Kompany said: “I can only salute Milan's decision to leave the pitch. Also noted that the majority of the fans were completely supportive of the players.”
Piara Powar, executive director of the FARE network, called for the Italian FA to take strong action.
“We salute Kevin-Prince Boateng for his actions and his team-mates for their support,” said Powar.
“This is the not the first time a player has walked off in Italy – if the situation continues it may not be the last.
“Italy, as much as any country in Europe, has a serious problem of racism to deal with. Football infrastructure is in need of renewal and at serious odds with the changing nature of Italian society.
“We look forward to strong action by the FIGC (Italian FA).”
In June, Uefa president Michel Platini said that any players who walked off the pitch at Euro 2012 because of racist abuse would be booked.