"You know how I be," Shaq rapped. "Last week Kobe couldn't do without me."
Bryant led the Lakers to the NBA Finals this season, but they were beaten 4-2 by the Boston Celtics.
O'Neal and Bryant last played together during the 2003-04 season, when the duo led the Lakers to the Finals. They lost to the Pistons that season, and soon after O'Neal was traded to the Miami Heat, breaking up a duo that won three titles.
O'Neal went on to win a championship with the Heat in 2006. During his rap, O'Neal, who was traded to the Suns last year, said that he is "the difference between first and last place."
He also implored the crowd to sing along to his oft-repeated chorus: "Kobe [expletive], tell me how my [expletive] tastes."
Smiling and laughing often, O'Neal also sang that Bryant broke up his marriage.
"I'm a horse. Kobe ratted me out," he rapped. "That's why I'm getting divorced. He said Shaq gave a [woman] a mil. I don't do that 'cause my name's Shaquille. I love 'em, I don't leave 'em. I got a vasectomy, now I can't breed 'em."
In 2004, Bryant, while embroiled in a rape investigation, alleged that O'Neal paid up to $1 million in hush money to various women. O'Neal told ESPN then: "This whole situation is ridiculous."
After repeating the chorus a number of times on Sunday night, O'Neal ended his rap by singing, "
Kobe, you can't do without me" over and over.
Reached by ESPN's Stephen A. Smith on Monday, O'Neal issued the following statement: "I was freestyling. That's all. It was all done in fun. Nothing serious whatsoever. That is what MC's do. They freestyle when called upon. I'm totally cool with Kobe. No issue at all. And by the way, don't forget, six albums, two platinum, two gold. Anybody who knows me knows I'm a funny freestyler. Check the NBA DVD when I was rapping about Vlade Divac during my first championship run. Please tell everybody don't make something out of nothing."
O'Neal and Bryant do have a history of feuding, however, which started even before the Lakers split them up. Bryant bristled when O'Neal called him his "little brother." At one point, Bryant questioned O'Neal's conditioning.
Soon after being traded by the Lakers, O'Neal didn't hide his disdain, calling Bryant a "clown" and a "joke."
In recent years, however, the war of words has quieted, and O'Neal even went on record as saying that Bryant should have won the 2007 MVP award.
On Monday, O'Neal tried to explain how the freestyle format shouldn't be taken too seriously.
"Everyone that knows Shaq knows two things about me: One, that I'm a rapper, and two, that I'm a comedian. When I played with Kobe, me, him, Brian Shaw, J.R. Rider, we had freestyle sessions all the time. ... all in fun and we said crazier stuff than that. If I hurt anyone's feelings, I apologize."