Milan's match against fourth-tier side Pro Patria was abandoned when Boateng, in possession on the left wing in the 26th minute, suddenly picked the ball up and smashed it towards the stand behind him.
The Ghana midfielder then tore off his shirt and walked off the field at the opposite end. On his way, he applauded other sections of the crowd, who then appeared to react angrily towards the corner of the ground from which the chants came.
Pro Patria's Dario Alberto Polverini attempted to talk to Boateng as he departed, but the midfielder carried on walking and the rest of the players and officials followed him off the pitch.
It was quickly established that play would not restart. Milan's official website, acmilan.com, was running a text commentary on the game, the headline on which was changed to read "Pro Patria-Milan suspended definitively".
The entry for the 26th minute read: "AC Milan leaves the pitch after racist abuse by a minority of Pro Patria fans at Boateng, (Mbaye) Niang, (Urby) Emanuelson and (Sulley) Muntari. The rest of the fans in the stands disassociated themselves from such racist events."
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."
The match was goalless at the time, with Muntari having had a goal disallowed for offside.