Abstract Finite element method (FEM) was used to simulate the process of a direct current (DC) flash butt welding (FBW) processing. In the simulation thermal–electrical coupling and flash process are considered. Element live-death method was adopted to simulate metal melting and metal loss during the flash process. Then, the temperature field of the welded joint was computed. In addition, a Monte Carlo (MC) simulation technology was utilized to investigate the Austenite grain growth in the heat affected zone (HAZ) of the FBW for the ultra-fine grain steel. On the basis of the result of the temperature field, an experimental data-based (EDB) model proposed by Gao was used to establish the relation between the MC simulation time and real time in the grain growth kinetics simulation. Moreover, thermal pinning was considered due to the effect of temperature gradient on HAZ grain growth of welded joint. The simulations give out the grain size distribution in HAZ of the FBW welded joint for the ultra-fine grain steel and effect of grain growth due to temperature gradient.