Two-dimensional magnetohydrodynamic boundary layer flow of non-Newtonian power-law nanofluids past a linearly stretching sheet with a linear hydrodynamic slip boundary condition is investigated numerically. The non-Newtonian nanofluid model incorporates the effects of Brownian motion and thermophoresis. Similarity transformations and corresponding similarity equations of the transport equations are derived via a linear group of transformations. The transformed equations are solved numerically using Runge-Kutta-Fehlberg fourth-fifth order numerical method available in the Maple 14 software for the influence of power-law (rheological) index, Lewis number, Prandtl number, thermophoresis parameter, Brownian motion parameter, magnetic field parameter and linear momentum slip parameter. Validation is achieved with an optimized Nakamura implicit finite difference algorithm (NANO-NAK). Representative results for the dimensionless axial velocity, temperature and concentration profiles have been presented graphically. The present results of skin friction factor and reduced heat transfer rate are also compared with the published results for several special cases of the model and found to be in close agreement. The study has applications in electromagnetic nanomaterials processing.