TMZ has learned Tone-Loc was arrested for DUI back in December — but the rapper says it’s all a big misunderstanding because he doesn’t drink … he was merely having a seizure behind the wheel.

Loc — real name Anthony Terrell Smith — was pulled over by LAPD officers around 3:00 AM on December 13 after they spotted him driving erratically.

@funkmasterflex

We’re told Tone-Loc was hauled in to a nearby station where he was booked for DUI and released 12 hours later on $5,000 bail.

But Tone’s manager tells us the rapper does not drink at all — and hasn’t for many years. However, he does have a storied history with seizures.

The manager told us cops “realized” Tone’s medical situation and that’s why they released him. Tone checked himself into a hospital later that day and believes the seizure could have been caused by “bad food he had earlier that day.”