The effect of transpiration on unsteady two-dimensional flow of an MHD non-Newtonian Maxwell fluid over a stretching surface in the presence of a heat source/sink is investigated. The upper convected Maxwell fluid model is used to characterize the non-Newtonian fluid behavior. Using a similarity transformation the governing partial differential equations of the problem are reduced to a system of ordinary differential equations (ODEs), and the ODEs are solved numerically by a shooting method. The flow features and the heat transfer characteristics are analyzed and discussed in detail for several sets of values of the governing parameters. Though the velocity of the fluid initially decreases with increasing unsteady parameter but it increases finally. Quite the opposite is true with the temperature. Furthermore, the velocity of the fluid decreases with an increasing magnetic or Maxwell parameter. But the temperature is enhanced with an increasing Maxwell parameter. It is observed that the effect of the transpiration is to decrease the fluid velocity as well as the temperature. The results obtained reveal many interesting behaviors that warrant further study of the equations related to non-Newtonian fluid phenomena, especially the shear-thinning phenomena. Shear thinning reduces the wall shear stress.