In this simulation, the nanoparticle distribution and entropy generation were studied using the Buongiorno’s developed two-phase model and magnetic field inside a porous semiannulus cavity. The influence of three terms was considered in the Buongiorno’s developed two-phase model such as Brownian motion, thermophoresis, and magnetophoresis effects. In addition, the entropy generation was assessed due to temperature and velocity gradient. The evidence showed that the effects of the magnetic field in high porosities and volume fraction of nanoparticles were remarkable on the Nusselt number and entropy generation. Also, irreversibility due to heat transfer is much greater than fluid friction.