Increasing attention has been paid to the study of heat and moisture migration in soils, but little research has been done on heat and moisture transport in soils containing stones. In this paper, an improved random generation method is proposed to generate soil porous media containing different stones and a fully connected pore. The lattice Boltzmann method (LBM) model for multiphase flow and heat transfer is used to simulate the heat and moisture migration of four types of soils: stone-free, sandstone, limestone, and shale. The simulations show that the presence of rocks impedes the flow of fluids but enhances the heat transfer in the soil. Considering the mesoscopic nature of the LBM and the porous media model construction method, the proposed model has a potential of simulating heat and mass transfer phenomena in multiphase multi-component porous media.