An analysis has been carried out to study the magnetohydrodynamic boundary layer flow and heat transfer characteristics of a non-Newtonian nanofluid over a flat sheet in the presence of heat generation/absorption. The governing nonlinear partial differential equations are transformed into a system of coupled nonlinear ordinary differential equations using similarity transformations and then tackled numerically using the RungeKutta-Fehlberg-45 method. The velocity, temperature and nanoparticle concentration profiles are analyzed with respect to the involved parameters, namely, Prandtl number Pr, magnetic parameter M, source/sink parameter A, Brownian motion parameter N b , thermophoresis parameter N t and Lewis number Le. It is found that the temperature of the fluid increases with the increase in heat source parameter and decreases with heat sink parameter.