Entropy generation minimization has significant importance in fluid flow, heat and mass transfer in an enclosure to get the maximum efficiency of a system and to reduce the loss of energy. In the present study, the analysis of mixed convection fluid flow, heat and mass transfer with heat line and mass line concept and entropy generation due to the effects of fluid flow, heat flow, mass flow and magnetic field in a trapezoidal enclosure with linearly heated and diffusive left wall, uniformly heated and diffusive lower wall, cold and nondiffusive right wall, adiabatic and zero diffusion gradient top wall have been reported. Parametric studies for the wide range of Prandtl number (Pr = 0.7 for air cooling system and Pr = 1000 for the engines filled with olive or engine oils), Rayleigh number (Ra = 103–105), aspect ratio (A = 0.5–1.5) and inclination angle of the cavity (ϕ = 45°–90°) have been performed, which help to construct the perfect shape of cavity in many engineering and physical applications so that the entropy is minimum to get the maximum efficiency of any system. The finite-difference approximation has been used to find out the numerical solutions. Biconjugate Gradient Stabilized (BiCGStab) method is used to solve the discretized nonhomogeneous system of linear equations.