In this study, the movement of a silicone plug is actuated by the application of heat flux to one end of a capillary tube. The transient motion of the plug is investigated in a numerical simulation. The finite element method with the two-phase level set technique, developed by Comsol Multiphysics, is used to solve the incompressible Navier–Stokes equations coupled with the energy equation. The results show that the flow motion is affected by the thermocapillary effect generated by the temperature gradient along the gas–liquid interface near the receding side and the capillary force caused by the temperature difference between the ends of the liquid plug. For a longer migration time, the flow mainly moves horizontally from the hot side to the cold side near the tube wall and then returns to the hot side near the center of the tube due to the capillary force effect. There is a smaller clockwise circulation near the receding contact angle caused by the thermocapillary convection. The flow motion causes significant distortion of the isotherms inside the silicone plug. The temperature gradient along the tube is enhanced by the flow motion inside the capillary tube. The liquid plug accelerates rapidly in the initial stage and then decelerates after it reaches the maximum speed. During the migration process, the receding contact angle is always greater than the advancing one. An increase in the input heat flux leads to a higher migration velocity due to the higher temperature gradient along the tube wall. When the initial contact angle is smaller, the migration velocity moves faster due to the higher capillary force. A liquid plug with a lower viscosity moves faster owing to the lower viscous force. The numerical simulation results are in good agreement with the results from previous experiments.