When the cop ran Flav's name in the system, he learned the rapper was a wanted man stemming from several prior brushes with the law.

According to law enforcement, Flav never settled up with the court in 4 separate automobile-related matters -- including driving without proof of insurance, a parking violation and two cases of driving without a license.

We're told Flav was taken to a nearby jail -- where he was booked, posed for a brand new mug shot and was eventually released.