More legal drama for Ricky Williams ... the ex-NFL star was arrested in Texas this week on traffic warrants.

The ex-Texas Longhorns running back didn't appear too concerned when the time came to snap his mug shot -- he even broke out a smile.

Cops say the 40-year-old Heisman Trophy winner was pulled over on Tuesday for a routine traffic stop -- and when cops pulled his records, they noticed an active warrant for his arrest.

Williams was hauled to Travis County Jail -- but he's out now.

No word about why there was an active warrant out for him in the first place. We're working on it.

Story developing ...