This work numerically examines the thermal behavior of lid-driven magnetohydrodynamic nanofluid (Cu–H2O) flow within a porous hexagonal enclosure embedded with two conductive fins. The top wall moves in the \(\:+\text{x}\) direction of velocity \(\:{\text{U}}_{0}\) and is maintained at temperature \(\:{\text{T}}_{\text{c}}\) , while the bottom wall is insulated. The lower slanted walls are imposed at a constant heat flux, whereas the upper slanted walls are adiabatic. The finite difference approach transforms the model equations into a system of algebraic equations that are iteratively solved utilizing relaxation techniques in MATLAB software. Numerical simulations and graphical illustrations are used to analyze flow and heat transfer over a wide range of relevant parameters. The findings demonstrate that increasing the Reynolds and Darcy numbers enhances the heat transfer rate, whereas a stronger magnetic field suppresses it. In addition, the average Nusselt number (Nuav) along the lower slanted walls, i.e., left and right, upsurges by 10.35% and 13.69%, respectively, as ϕ rises from 0 to 4%. Furthermore, the results indicated that inclusion of wall-mounted fins reduces the Nuav compared to the unfinned case.