We investigate the unsteady laminar convective magnetohydrodynamic nanofluids flow in a square cavity driven by an exothermic chemical reaction. Because exothermic chemical reactions are intrinsic in nanofluidic flow applications, we consider this exothermic chemical reaction in the analysis, which is governed by Arrhenius kinetics energy. A water-based nanofluid containing iron oxide (Fe3O4) nanoparticles is employed in the simulation. The square cavity is accurately propounded by a combination of suitable heating and flow conditions. The left vertical wall of the enclosure is considered a higher unevenly heated wall, the right vertical wall of the domain is considered a relatively cool constant temperature, and the upper and lower walls are considered insulating walls. Each wall assumes a no-slip condition. The nanofluid governing equations are transformed into the non-dimensional set of equations using similarity analysis and then modified into finite element equations. Galerkin's method in finite element analysis is used to obtain the results of the problem. The results show that the Rayleigh number, the Frank-Kamenetsky number, and the nanosolid volume ratio all have significant effects on the convective flow regime, and the average Nusselt number increases with these parameters. Due to the greater value of the Rayleigh number (Ra = 106), the average Nusselt number increased to 75.92%, and heat generation due to a strongly exothermic reaction (higher Frank-Kamenetskii number) can blow up the bounded solution. The water-Fe3O4 nanofluid achieves a greater rate of heat transfer (maximum 22.65%) than that of the base fluid.