Abstract This paper deals with the study of boundary layer flow and heat transfer of a visco-elastic fluid immersed in a porous medium over a non-isothermal stretching sheet. The fluid viscosity is assumed to vary as a function of temperature. The presence of variable viscosity of the fluid leads to the coupling and the non-linearity in the boundary value problem. A numerical shooting algorithm for two unknown initial conditions with fourth-order Runge–Kutta integration scheme has been used to solve the coupled non-linear boundary value problem. An analysis has been carried out for two different cases namely (1) prescribed surface temperature (PST), and (2) prescribed heat flux (PHF), to get the effect of fluid viscosity, permeability parameter and visco-elastic parameter for various situations. The important finding of our study is that the effect of fluid viscosity parameter is to decrease the wall temperature profile significantly when flow is through a porous medium. Further, the effect of permeability parameter is to decrease the skin friction on the sheet.