Solving of MHD flow by the lattice Boltzmann method, utilizing classical equations has been investigated by presenting MHD mixed convection in a lid-driven cavity by a linearly heated wall. The Hartmann number varied from Ha = 0 to 100; furthermore, the study has been conducted for Richardson numbers (Ri) from 0.01 to 100, while the directions of the magnetic field were investigated for θ = 0° and 90°. Results show that the augmentation of Richardson number causes heat transfer to increase, as the heat transfer decreases by the increment of Hartmann number for various Richardson numbers and the directions of the magnetic field. The highest decline of heat transfer on the linearly heated wall was found at θ = 0° for Richardson numbers of Ri = 100 and Ha = 100. On the other hand, the least effect of the magnetic field is observed at Ri = 0.01 from Ha = 25 to 100 for both directions on the linearly heated wall. Moreover, the magnetic field influences heat transfer marginally at θ = 90° against θ = 0°, which changes dramatically. Heat transfer on the heated wall at the bottom of the cavity behaves like the linearly heated wall regarding the effect of the magnetic field.