An analysis is carried out to study two dimensional stagnation-point flow of heat and mass transfer of an incompressible, electrically conducting fluid towards a heated porous stretching sheet embedded in a porous medium in the presence of chemical reaction, heat generation/absorption and suction or injection effects. A scaling group of transformations is applied to the governing equations. After finding three absolute invariants a third order ordinary differential equation corresponding to the momentum equation and two second order ordinary differential equation corresponding to energy and diffusion equations are derived. Furthermore the similarity equations are solved numerically by using shooting technique with fourth-order Runge–Kutta integration scheme. A comparison with known results is excellent. The phenomenon of stagnation-point flow towards a heated porous stretching sheet in the presence of chemical reaction, suction or injection with heat generation/absorption effects play an important role on MHD heat and mass transfer boundary layer. The results thus obtained are presented graphically and discussed.