Justin Bieber was arrested for DUI ... TMZ has learned.

Law enforcement tells them... Bieber was busted in Miami Beach and it didn't end with DUI ... he was also busted for resisting arrest without violence, drag racing and driving on an expired license.

The arrest occurred early Thursday morning.

Bieber is now in custody and is at the police department where he is being tested -- presumably to more precisely measure his blood alcohol level.

His next stop will be jail, where he will be booked and processed and bail will be set.

We're told Bieber had just left a club and was driving at the time cops spotted him.

TMZ's video doesn't show much, but you get the idea here:

More on this developing story at TMZ Here