In this paper, the effect of magnetic field on mixed convection of shear-thinning fluids in a square two sided lid-driven cavity under the combined buoyancy effects of thermal and mass diffusion has been analyzed by finite difference lattice Boltzmann method (FDLBM). This study has been conducted for the certain pertinent parameters of Richardson number (Ri=0.00062–1), Hartmann number (Ha=0–90), Lewis number (Le=5 and 10), power-law index (n=0.2–1) as the buoyancy ratio is studied from N=−20 to 20. Grashof number is fixed at Gr=100 in this study. Results indicate that the augmentation of Richardson number decreases heat and mass transfer. The enhancement of Hartmann number declines heat and mass transfer for multifarious buoyancy ratios and power-law indexes. The fall of the power law index declines heat and mass transfer at Ri=0.00062 and 0.01 for various Hartmann numbers and buoyancy ratios. The power-law index change influences heat and mass transfer differently at Ri=1 for various buoyancy ratios, Lewis and Hartmann numbers. The growth of Lewis number enhances the mass transfer for the studied Hartmann numbers and buoyancy ratios. The rise of Hartmann number decreases the effect of power-law index on heat and mass transfer gradually.