A ground heat exchanger is a key component of a ground source heat pump system, and heat and moisture transfer occurs simultaneously in soil with a horizontal ground heat exchanger in operation. A new method has been developed to generate moisture and temperature profiles in soil with spatially and temporally varying properties. The profiles are used as initial data for accurate solution of the equations for transient heat and moisture transfer in soil containing a buried horizontal ground heat exchanger. The impacts of initial conditions of soil and coupled heat and moisture transfer are assessed on the thermal performance of a horizontal ground heat exchanger for a ground source heat pump for different installation depths and soil textures. Seasonal heat transfer through a horizontal heat exchanger increases with installation depth and a heat exchanger installed at 2 m deep can transfer 19% more heat than that at 1 m deep. Heat transfer in sandy soil is 17% higher than in loamy sand soil which is 14.5% higher than in clay loam soil. The maximum differences between models with and without moisture transfer for the prediction of heat transfer through a heat exchanger are 24%, 17% and 18% in clay sand, loamy sand and sandy soils, respectively. In conclusion, it is necessary to use a coupled heat and moisture transfer model in order to predict accurately the seasonal thermal performance of a ground heat exchanger in shallow ground.