Dallas Mavericks star Shawn Marion isn't taking any chances with the NBA lockout -- in fact, he just turned down "Dancing with the Stars" ... to make sure he's free to practice with his team this fall.

Sources close to Shawn tell TMZ, "Dancing" sent him an official offer to appear on the show, but the NBA champ wants to make sure he's 100% available in case the lockout ends early ... so it's a no go.

"Dancing" would end in November and NBA season usually starts in October -- which could put Marion in a difficult position if the upcoming season isn't put on ice.

We're told Shawn is adamant ... he just doesn't wanna be caught with his pants down -- or in this case, his leotard.