Abstract Aims The influence of the moss layer on soil structure and soil water retention is not well understood. Therefore, this study aims to investigate the changes in soil structure and soil water retention under moss layer and to reveal the influencing factors of these changes. Methods 3D networks of soil macropores were quantified using CT scanning and image analysis techniques, and soil water retention characteristics were quantified through soil water retention curves (SWRCs) and VG model. Results The length density of the soil macropores under the thin moss and thick moss layers was approximately 2.7 and 1.6 times higher than that under no moss cover. The soil water retention properties under the thin and thick moss layers were better than those under no moss cover, with the highest plant-available water capacity under the thin moss layer. The plant-available water capacity of soils under the thin moss layer was higher than that of soils under the thick moss layer. The maximum water-holding capacity of the moss layer was significantly positively correlated with the field water-holding capacity of the soil and negatively correlated with the equivalent diameter of the macropores, while the storage capacity of the moss layer was significantly negatively correlated with the maximum effective water content of the soil. Conclusions The effect of the moss layer on water retention may be mainly through influencing the pore distribution and organic matter accumulation. The moss layer had a positive ecohydrological effect on soil water retention and even water conservation in forest soils.