Earth–air tunnel ventilation is an energy efficient ventilation technique that makes use of relatively stable soil temperature in shallow ground for preheating and cooling of supply air to a building. During operation, an earth–air heat exchanger interacts with the soil and atmosphere and the performance varies with the soil and atmospheric conditions. A computer program has been developed for modelling of coupled heat and moisture transfer in soil and for simulation of the dynamic thermal performance of an earth–air heat exchanger for preheating and cooling of a building. The impacts of dynamic interactions between the heat exchanger, soil and atmosphere are illustrated from the comparison of the heat transfer rate, heat exchanger temperature and supply air temperature through the heat exchanger for both preheating and cooling. It is shown that neglecting the interactions between the heat exchanger, soil and supply air would over predict the thermal performance of an earth–air heat exchanger. Neglecting the interactions between the soil surface and atmosphere while assuming axi-symmetric distributions of heat and moisture transfer as well as soil properties around the heat exchanger is not only unrealistic but also would fail to produce reliable data for long-term operational performance of the earth–air heat exchanger installed in shallow ground. The performance of an earth–air tunnel ventilation system can be enhanced when operated for both winter preheating and summer cooling of a building.