EXCLUSIVE

Mac Miller is locked up after allegedly crashing his car while he was drunk and then fleeing the scene.

Law enforcement sources tell TMZ, Mac was driving in the San Fernando Valley around 1 AM Thursday when his 2016 G-Wagon hit a power pole, knocking it down.

Mac and his 2 passengers fled the scene on foot. An eyewitness called the cops and told them which direction Mac and his buddies had gone. Cops arrived at the crash scene, ran the plates and got Mac's address. They went to his home and we're told he confessed to driving drunk and fleeing the scene.

Play video content MAY 2018 RMG News/MEGA

Cops will give him this ... one law enforcement source tells us, "He was the most polite and nice intoxicated person we've ever seen."

Mac was cuffed and taken to jail. His bail was set at $15k. As of the time this post was published, he's still behind bars.