A numerical study is carried out to demonstrate the heat transmission events of nanofluid in a square cavity saturated by aluminum foam porous medium under the effect of slanted periodic magnetic field. The cavity wall is heated from left and cooled from right while horizontal walls are supposed to be adiabatic. The Brownian motion of nanoparticle is taken into consideration in the thermal conductivity model construction. The dimensionless governing equations including Darcy-Brinkman model are solved by Galerkin-FEM. The outcomes are exposed with depictions of streamlines, isotherms and average Nusselt numbers. The numerical investigation is performed for parameters: Darcy number, Rayleigh number, Hartmann number, porosity, leaning angle of the periodic magnetic field, period number, and nanoparticle volume fraction. The heat transfer rate upsurges noticeably for the rise of nanoparticle volume fraction, period number, Darcy number and Rayleigh number but the reverse trend is found for the parameter Hartmann number as well as porosity. From the acquired numerical outcomes, the maximum rate of heat transfer is attained at δ=π/4 when λ = 1. Jagannath University Journal of Science, Volume 10, Number II, Dec. 2023, pp. 145-158