Law enforcement sources tell TMZ ... the rapper used a small knife to stab the man two times in the chest and once in the head Tuesday night in Midtown. The man allegedly called Kidd Creole a gay slur.
The homeless man -- identified as 55-year-old John Jolly -- died at Bellevue Hospital.
Cops say the 57-year-old rapper was taken into custody Wednesday. They used surveillance footage to identify Creole, and believe his motive was an angry reaction to the gay slur.
In case you need a refresher, check out the video below!