Abstract This communication explores magnetohydrodynamic (MHD) boundary-layer flow of Jeffrey nanofluid over a nonlinear stretching surface with active and passive controls of nanoparticles. A nonlinear stretching surface generates the flow. Effects of thermophoresis and Brownian diffusion are considered. Jeffrey fluid is electrically conducted subject to non-uniform magnetic field. Low magnetic Reynolds number and boundary-layer approximations have been considered in mathematical modelling. The phenomena of impulsing the particles away from the surface in combination with non-zero mass flux condition is known as the condition of zero mass flux. Convergent series solutions for the nonlinear governing system are established through optimal homotopy analysis method (OHAM). Graphs have been sketched in order to analyze that how the temperature and concentration distributions are affected by distinct physical flow parameters. Skin friction coefficient and local Nusselt and Sherwood numbers are also computed and analyzed. Our findings show that the temperature and concentration distributions are increasing functions of Hartman number and thermophoresis parameter.