By Agence France-Presse
The rapper, whose real name was Jahseh Onfroy, was gunned down in broad daylight near a motorcycle store in Deerfield Beach north of Miami, the Broward County sheriff's department said.
He was pronounced dead at a nearby hospital. XXXTentacion becomes one of the biggest names in hip-hop to be killed in recent years after a slew of slayings in the 1990s.
A spokesman for the sheriff's department declined to give further details and a representative for XXXTentacion did not immediately respond to a request for comment.
The celebrity news site TMZ, quoting audio from a dispatch call to the sheriff's department, said that two assailants in hoodies, with the gunman in a red mask, stole a Louis Vuitton bag from the rapper's vehicle and sped away in a black SUV.
A Florida native identifiable for his spiked-up dreadlocks, XXXTentacion found a wide following by uploading songs on sharing site SoundCloud, with a dark, often muffled style of hip-hop full of lyrics about his depression and past crime.
Without any promotion in traditional terms, his second album, entitled "?," debuted at the top of the Billboard album chart in March.
XXXTentacion's success triggered controversy due to a past that is violent even by the standards of the rap world. Around the time of his latest album's release, he was being released from house arrest as he awaits trial on charges of beating up his pregnant ex-girlfriend.
Spotify last month singled out XXXTentacion as part of a policy not to promote songs by artists known for "harmful or hateful" behavior, but the leading streaming service backed down after charges that it had overstepped its role over vague criteria.