Energy saving has always been a topic of great interest. The usage of nano-enhanced phase change material NePCM is one of the energy-saving methods that has gained increasing interest. In the current report, we intend to simulate the natural convection flow of NePCM inside an inverse T-shaped enclosure. The complex nature of the flow results from the following factors: the enclosure contains a hot trapezoidal fin on the bottom wall, the enclosure is saturated with pours media, and it is exposed to a magnetic field. The governing equations of the studied system are numerically addressed by the higher order Galerkin finite element method (GFEM). The impacts of the Darcy number (Da = 10−2–10−5), Rayleigh number (Ra = 103–106), nanoparticle volume fraction (φ = 0–0.08), and Hartmann number (Ha = 0–100) are analyzed. The results indicate that both local and average Nusselt numbers were considerably affected by Ra and Da values, while the influence of other parameters was negligible. Increasing Ra (increasing buoyancy force) from 103 to 106 enhanced the maximum average Nusselt number by 740%, while increasing Da (increasing the permeability) from 10−5 to 10−2 enhanced both the maximum average Nusselt number and the maximum local Nusselt number by the same rate (360%).