Exclusive Details

9:24 AM PT -- According to police docs -- obtained by TMZ -- cops pulled Williams over Wednesday night for driving without a license. The docs say he was then placed into custody for an active felony warrant ... seemingly for the murder. The warrant was signed Tuesday night, just a day after the murder.

7:39 AM PT -- Interestingly enough, Williams followed XXX on Instagram.

6:00 AM PT -- Williams has previous arrests for cocaine possession, weapons possession, domestic violence and aggravated assault with a firearm. We previously reported he was also arrested for grand theft auto.

During an incident in 2014, Williams allegedly held a gun to his girlfriend's head. According to arrest records, he has at least 11 felonies.

XXXTentacion's alleged murderer is in custody ... TMZ has confirmed.

The suspect's name is Dedrick D. Williams, and Broward County Sheriff's Dept. took the 22-year-old into custody Wednesday evening and booked him for first-degree murder.

During a vigil Wednesday night in South Florida ... X's mother told family and friends she'd just gotten notice from police that they'd made the arrest.

Waiting for your permission to load the Instagram Media.

Someone at the gathering mentioned there was a chase on the nearby highway I-95 ... which may have ended with cops nabbing Williams for the murder of X.

Williams was also hit with a probation violation for a previous grand theft auto charge. We're told he is being held without bail.

TMZ broke the story .... the 20-year-old rapper was gunned down Monday afternoon as he sat in his car outside a motorcycle dealer. The murder happened in broad daylight, and there were several witnesses -- some of whom reported seeing 2 masked men flee the scene.