Two-dimensional magnetohydrodynamic (MHD) boundary layer flow of an upper-convected Maxwell (UCM) fluid passing through the shrinking sheet is considered. With the impact of thermal slip, thermal radiation and heat source-sink conditions, the UCM fluid model is integrated. The method of the Lie scaling group is used to transform the strongly nonlinear governing partial differential equations (PDEs) into the ordinary differential equations (ODEs). The transformed ODEs are numerically solved using NDSolve command of MATHEMATICA and graphically presented with their results. The Deborah number’s influence on the velocity profile $$f^{\prime } (\eta )$$ is studied for different values and different behavior observed. The Hartmann number M and the mass transfer parameter S have decreased the boundary layer thickness. The Prandtl number has increased the temperature profile $$\theta (\eta )$$ . In contrast, the thermal boundary layer thickness was decreased by the heat source-sink parameter Q , the radiation parameter R and the thermal slip parameter L. Table 1 shows the verification of the results.