The controlled migration of droplets is of great significance in industrial applications and scientific investigation. In this study, a threedimensional model with a level-set method is established to simulate the migration of a sessile droplet on a substrate with a temperature gradient. The moving contact line is accomplished by the line-to-plane construction method with the Navier slip boundary condition. After the model is validated with reliable theoretical results, the effect of contact angle, dynamic viscosity ratio, Marangoni number, Prandtl number, and Ohnesorge number on the droplet migration is studied. The results show that at low contact angles, the droplet migrates toward the cold region of the substrate, whereas at large contact angles, the droplet migrates toward the hot region. The opposite migration directions are due to the difference in the vortex dynamics and stagnation points induced by the thermocapillary flow. The droplet migration speed can be reduced, and the direction can be changed by increasing the viscosity ratios between outer gas and inner liquid, but it can be increased with the increasing Marangoni number, with the migration direction unchanged. The thermocapillary flow is weakened with the increasing Prandtl number, leading to the decrease in migration speed at low contact angles but the increase in migration speed at large contact angles. The viscous shear force increases with the increasing Ohnesorge number, leading to a reduction in the steady droplet migration speed. These findings can provide guidance for the controlled migration of sessile droplets.