In this paper, the effect of a variable magnetic field (VMF) on the natural convection heat transfer of Fe3O4-water nanofluid in a half-annulus cavity is studied by finite element method using FlexPDE commercial code. After deriving the governing equations and solving the problem by defined boundary conditions, the effects of three main parameters (Hartmann Number (Ha), nanoparticles volume fraction (φ) and Rayleigh number (Ra)) on the local and average Nusselt numbers of inner wall are investigated. As a main outcome, results confirm that in low Eckert numbers, increasing the Hartmann number make a decrease on the Nusselt number due to Lorentz force resulting from the presence of stronger magnetic field.