A mathematical model is proposed to describe the flow, heat, and mass transfer behaviour of a non-Newtonian (Jeffrey and Oldroyd-B) fluid over a stretching sheet. Moreover, a similarity solution is given for steady two-dimensional flow subjected to Buongiorno’s theory to investigate the nature of magnetohydrodynamics (MHD) in a porous medium, utilizing the local thermal non-equilibrium conditions (LTNE). The LTNE model is based on the energy equations and defines distinctive temperature profiles for both solid and fluid phases. Hence, distinctive temperature profiles for both the fluid and solid phases are employed in this study. Numerical solution for the nonlinear ordinary differential equations is obtained by employing fourth fifth order Runge–Kutta–Fehlberg numerical methodology with shooting technique. Results reveal that, the velocity of the Oldroyd-B fluid declines faster and high heat transfer is seen for lower values of magnetic parameter when compared to Jeffry fluid. However, for higher values of magnetic parameter velocity of the Jeffery fluid declines faster and shows high heat transfer when compared to Oldroyd-B fluid. The Jeffery liquid shows a higher fluid phase heat transfer than Oldroyd-B liquid for increasing values of Brownian motion and thermophoresis parameters. The increasing values of thermophoresis parameter decline the liquid and solid phase heat transfer rate of both liquids.