EXCLUSIVE

Roger Mason's out, Ice Cube is in ... with the rap legend replacing the ex-NBA star as the Commish of the BIG3 basketball league after allegations of some seriously shady conduct.

TMZ Sports has obtained a letter the BIG3 sent to players, coaches and staff explaining the move:

"We are writing to inform you of the decision by the BIG3 to terminate the employment of Roger Mason Jr. for cause under the terms of his employment agreement with the league."

The letter details a corruption investigation involving Mason and his ties to two Qatari investors who allegedly stiffed the league out of millions of dollars ... investors that Mason brought to the league in the first place.

BIG3 sued the investors Ayman Sabi and Ahmed Al-Rumaihi -- but Mason allegedly refused to cooperate with the league because of his personal relationship with the men.

The league says Mason had an obligation to side with BIG3 due to his role as Commish.

One of the problems, the league says it found evidence the Qataris were showering certain BIG3 employees with gifts and vacations while refusing to pay the league. The insinuation is that Mason was one of the beneficiaries and it corrupted his ability to effectively run the league.

The good news ... Ice Cube will step into the Commish role effective immediately and will stay in the job until the league finds a long-term replacement.