We study the thermocapillary migration of two-dimensional droplets of partially wetting liquids on a non-uniformly heated surface. The effect of a non-zero contact angle is imposed through a disjoining–conjoining pressure term. The numerical results for two different molecular interactions are compared: on the one hand, London–van der Waals and ionic–electrostatics molecular interactions that account for polar liquids; on the other hand, long- and short-range molecular forces that model molecular interactions of non-polar fluids. In addition, the effect of gravity on the velocity of the drop is analysed. We find that for small contact angles, the long-time dynamics is independent of the molecular potential, and the footprint of the droplet increases with the square root of time. For intermediate contact angles we observe that polar droplets are more likely to break up into smaller volumes than non-polar ones. A linear stability analysis allows us to predict the number of droplets after breakup occurs. In this regime, the effect of gravity is stabilizing: it reduces the growth rates of the unstable modes and increases the shortest unstable wavelength. When breakup is not observed, the droplet moves steadily with a profile that consists in a capillary ridge followed by a film of constant thickness, for which we find power law dependencies with the cross-sectional area of the droplet, the contact angle and the temperature gradients. For large contact angles, non-polar liquids move faster than polar ones, and the velocity is proportional to the Marangoni stress. We find power law dependencies for the velocity for the different regimes of flow. The numerical results allow us to shed light on experimental facts such as the origin of the elongation of droplets and the existence of saturation velocity.