According to the structural and heat transfer characteristics of soil heat storage, a novel layered slice algorithm is proposed to realize the rapid and accurate solution to the problem. The heat transfer process between the double U-tube heat exchanger and the surrounding soil is taken as an example to analyze its solving performance. The study finds that the layered slice algorithm has higher simulation precision and faster solving speed. Its maximum relative error of temperature is only 0.19%. Compared with the traditional 3D simulation algorithm, it can accelerate about 2.2~2.56 times. At the same time, the layered slice algorithm has an excellent parallel characteristic. Its maximum parallel speedup ratio is more than twice that of the traditional 3D algorithm. Due to the superior solving performance, the proposed algorithm can help the optimization design of the buried-tube heat exchangers.