EXCLUSIVE

Lamar Odom has been deep into crack cocaine for at least 2 years ... TMZ has learned.

TMZ broke the story ... Lamar has gone off the rails with drug use ... which is the principal cause of the crisis in his marriage to Khloe Kardashian. As we reported Lamar went to a rehab facility a year ago this month and stayed for 3 weeks before bailing -- and we're told the problem was crack.

Sources say Lamar's crack use was extreme before he went to rehab, but he cleaned up his act during the basketball season that just ended. Sources say shortly after he hung up his jersey, he started again with a bang.

As we reported ... Khloe threw Lamar out of the house a few days ago after he rejected an attempt at an intervention.

It's unclear how Lamar's problem will affect his basketball career.