EXCLUSIVE

Ex-NBA player Ben Gordon was arrested in L.A. on Thursday morning after allegedly freaking out at his apartment complex and pulling multiple fire alarms ... TMZ Sports has learned.

We're told 34-year-old Gordon -- who played for the Bulls, Pistons and Bobcats -- was apparently locked out of his apartment and went into meltdown mode ... pulling fire alarms inside the building.

LAPD and L.A. City Fire responded -- but there was no fire. Instead, they found Gordon and arrested him for falsely activating a fire alarm, a misdemeanor.

He's been taken into custody.