Rapper Beanie Sigel famous for his work with Jay-Z and Snoop Dogg was arrested early this morning in Philly for drugs and gun possession … 2 weeks before he’s supposed to turn himself in to prison for a separate crime.

As we previously reported, Sigel was sentenced to two years in the big house for failing to file tax returns for the years 2003, 2004, and 2005 — stiffing the IRS out of more than $700k in back taxes.

He was scheduled to be locked up in a couple weeks — but according to police, the rapper was busted this morning during a traffic stop … riding shotgun in a car filled with drugs, cash, and a gun.

Police claim the driver was carrying numerous prescription bottles, several pills wrapped in plastic bags in a cigarette pack, and marijuana.

Meanwhile, Sigel was allegedly carrying a bottle of codeine syrup with the label scratched off — as well as $4,650 in cash. Police claim they also found a gun in the center console.

Both Sigel and the driver are convicted felons prohibited from possessing a firearm.

The two were arrested and charged with gun and drug violations.