The main goal of the present work is to investigating the effect of non-uniform axial magnetic field with positive and negative gradients on subcooled nanofluid flow boiling. Also, for better understanding the existing phenomena, single-phase convection has been studied in the first part. Control volume technique for discretizing the governing equations, SIMPLEC algorithm for pressure-velocity coupling, and SST k-u model for turbulent flow have been used in this research, respectively. In the second part, a three dimensional two-fluid model is used to subcooled flow boiling and the available R-113 boiling experimental data are used to validate the results. The obtained results indicate that single-phase convection as well as subcooled flow boiling characteristics change not only by using nanofluid as a working fluid, but also by applying the non-uniform axial magnetic field. For the case of magnetic field with negative gradient, single-phase convection heat transfer rate increases. Also for the subcooled boiling flow, negative magnetic field gradient will lead to increase critical heat flux (CHF), due to the decrease in evaporation rate in the wall surface which is eventually responsible for wall dryout. As a result, a more safe operation condition of the industrial equipments can be achieved.