Abstract The present study explores magnetic nanoliquid mixed convection in a double lid–driven U-shaped enclosure with discrete heating using the lattice Boltzmann method (LBM) numerical method. The nanoliquid thermal conductivity and viscosity are calculated using the Maxwell and Brinkman models respectively. Nanoliquid magnetohydrodynamics (MHD) and mixed convection are analyzed and entropy generation minimisation has been studied. The presented results for isotherms, stream isolines and entropy generation describe the interaction between the various physical phenomena inherent to the problem including the buoyancy, magnetic and shear forces. The operating parameters’ ranges are: Reynolds number (Re: 1–100), Hartman number (Ha: 0–80), magnetic field inclination (γ: 0°– 90°), nanoparticles volume fraction (ϕ: 0–0.04) and inclination angle (α: 0°– 90°). It was found that the N um and the total entropy generation augment by increasing Re, ϕ: and γ. conversely, an opposite effect was obtained by increasing Ha and α. The optimum magnetic field and cavity inclination angles to maximum heat transfer are γ = 90° and α = 0.