In this work, we study the natural convection and thermal radiation heat transfer of diamond–water nanofluid around rotating elliptical baffle inside inclined trapezoidal cavity under Lorentz forces effect in the presence of uniform heat generation/absorption. The trapezoidal cavity lateral walls are uniformly cooled, and the top and bottom walls are kept adiabatic. The interior rotating elliptical baffle is uniformly heated. Our numerical study is realized by the software Comsol Multiphysics based on the on the finite element method. The results extracted show that an increment on the convection heat transfer is reached by increasing Rayleigh number, the radiation parameter and the elliptical baffle horizontal radius; however, the increment of Hartmann number reduces it. The effect of cavity inclination on the convection heat transfer depends on the baffle position. The presence of uniform heat generation increases the temperature field inside cavity and improves the convection flow, but the presence of uniform heat absorption reduces it. Using nanoparticles with higher shape factor improves more the convection heat transfer.