The 21-year-old Manchester City star said in an interview with France Football magazine that he reacted differently when Juventus fans targeted him with racist chants during a match for his former club Inter Milan in 2009.
"I pretended not to see anything," he was quoted as saying. "I wanted to play. I was young. It was for me to tell (the referee). Racism is unacceptable. I can't abide it."
But he added: "If it happens again, I'd leave the pitch straight away and I'd go home. This is 2012. It can't happen."
Fears over racism and violence in co-hosts Poland and Ukraine have mounted this week after the BBC aired a documentary showing fans in both countries making Nazi salutes and monkey chants at black players.
The programme also highlighted anti-Semitism and a serious assault on a group of Asian students.
The British government has also issued warning to black and ethnic minority fans about the risk of racist attacks, prompting the families of two black England players to say that they would not be going to support the team.
Balotelli, born in Italy to Ghanaian parents but adopted at the age of two, left no doubt as to his reaction if he was subject to racist taunts.
He said he was once in a bar in Rome and had bananas thrown at him, explaining that he would have "knocked out" the perpetrators if police had not arrived on the scene quickly.
"I hope that doesn't happen again. If anyone throws bananas at me, I'd go to prison because I'd kill them," he said in the interview, published on Tuesday.
Both Poland and Ukraine have denounced the warnings about far-right gangs and racism, saying that the problem was widespread across Europe.
Photos: Ajay Devgn, Parineeti, Tabu at 'Golmaal Again' trailer launch
Photos: Dipika Pallikal Karthik oozes oomph in bikinis and sarees
Photos: Kareena Kapoor Khan's grand birthday bash
Photos: 'Dangal' girls Sanya Malhotra, Fatima Sana Shaikh's dinner outing
Photos: Salman Khan, Daisy Shah spotted at the Mumbai airport