In the present study, numerical simulation of magnetohydrodynamic mixed convection heat transfer and fluid flow has been analyzed in a lid-driven enclosure provided with a constant flux heater. Governing equations were solved via differential quadrature method. Moving wall of the enclosure has constant temperature and speed. The calculations were performed for different Richardson number ranging from 0.1 to 10, constant heat flux heater length from 0.2 to 0.8, location of heater center from 0.1 to 0.9, Hartmann number from 0 to 100 and aspect ratio from 0.5 to 2. Two different magnetic field directions were tested as vertical and horizontal. It was found that results of differential quadrature method show good agreement with the results of literature. The magnetic field was more effective when it applied horizontally than that of vertical way. In both direction of magnetic field, it reduced the flow strength and heat transfer. Thus, it can be used as an important control parameter for heat and fluid flow.