In this paper, the results of adding nanoparticles and applying non-uniform magnetic fields on a biofluid (blood) flow through a two-dimensional horizontal channel with a step are reported. Two magnetic fields with positive and negative gradients were applied. The control volume technique and two-phase mixture model in the numerical approach have been used to illustrate the hydro-thermal behavior of flow. Simulation results reveal that nanoparticles can significantly increase the Nusselt number and wall shear stress. Also, the wall shear stress, Nu, and recirculation length in the presence of a magnetic field with different gradients can be externally controlled. Based on the results, the negative gradient magnetic field increases wall shear stress and Nu in the affected region, unlike the positive gradient.