Bam Margera got busted Sunday morning for DUI, and he made it pretty easy for cops to make the arrest ... TMZ has learned.

We're told Bam drove past CHP officers who were in the middle of stopping someone else, and when he slowed down, cops saw him on his phone, and told him to pull over. When the officers spoke to the "Jackass" star, we're told they detected a strong scent of alcohol.

Cops gave him a field sobriety test, and he took a Breathalyzer before they booked him for DUI. His bail was set at $15k -- about $10k more than usual -- but he was eventually released around 2:30 PM on his own recognizance.

This is Bam's first DUI arrest, but he's battled alcohol abuse for years. Just last year, he spoke about embracing sobriety. He and his wife had a son in December.