Soulja Boy was arrested in L.A. early this morning ... after cops say he was packin' a LOADED GUN, TMZ has learned.
Law enforcement sources tell us ... the 23-year-old rapper was a passenger in a vehicle that was pulled over in the San Fernando Valley for running a stop sign early Wednesday morning.
During the stop, cops say they noticed that Soulja was in possession of a loaded gun -- and arrested him on the spot.
Soulja was hauled to a nearby jail and booked on a felony charge. Bail was set at $35K.
Soulja has a history of run-ins with the law -- he was busted for weed and weapons back in 2011.
Story developing ...