The current study focuses on the thermal distribution in the boundary layer of a wedge with a variable surface temperature. The governing equations of MHD flow for variable wall temperature conditions can be converted to ODE by using similarity solutions, and the Hartmann number (Ha) from 1 to 3 can be solved via the colocation method. This method’s results are compared to those of the numerical method, and it is then evaluated and validated. As the angle or Ha increases, the width of the hydrodynamic boundary layer decreases, and the slope of the boundary layer increases, increasing the coefficient of friction on the surface. The results are obtained for variable wall temperature (n), Prandtl number (Pr) and Eckert number (Ec), where they are 0.5≤n≤1.5, 0.5≤Pr≤5, and 0.001≤Ec≤0.002, and at a certain angle. It is observed that when Ha, Pr, and n increase, the thermal boundary layer grows faster than before; thus, thickness decreases and the Nusselt number (Nu) rises; however, as the Ec adds, the Nu decreases on the wall.