Piston action can affect the thermal environment inside the tunnel by changing the air pressure and velocity. This is extremely unfavorable for tunnels in cold regions because it causes frost damage in cold season. Understanding the influence of piston action on the air temperature distribution inside the tunnel can help us determine the length and location of frost damage. In this paper, a heat transfer numerical model considering piston action is developed. And then, a high-speed railway tunnel in the northeast of China is taken as an example to explore the temperature distribution laws via computational fluid dynamic (CFD). Afterwards, the effects of air temperature outside the tunnel and train velocity on temperature distribution are analyzed. The results show that the piston action can accelerate the heat transfer between cold air outside and inside the tunnel, the anti-freezing length near tunnel entrance and exit must be extended based on the calculation result of existed empirical formula. Before the train enters the tunnel, the freezing length near tunnel entrance is 1158 m. After the train passing through the tunnel, the freezing length near tunnel entrance is between 1495 m and 1497 m when the air temperature outside the tunnel decreases from −1 °C to −15 °C. Under different train velocities (80 km/h, 130 km/h, 160 km/h, 200 km/h and 250 km/h), the freezing lengths near tunnel entrance are 1458 m, 1469 m, 1472 m, 1497 m, 1498 m and its near tunnel exit are 330 m, 342 m, 349 m, 356 m, 357 m, respectively. In the section of 50 m away from tunnel entrance, the air temperature near the train changes suddenly, while the air temperature far away from the train changes gently. After the train passing through the tunnel, the air temperature inside the tunnel is consistent to that outside the tunnel within a specific distance from entrance. This study provides a guideline and references for the structure design and the construction of anti-freezing measurements for the tunnels in cold regions.