As one means of close-to-nature management, forest gaps have an important impact on the ecological service function of plantations. To improve the current situation of P. massoniana plantations, three different sizes of forest gaps (large gaps, medium gaps and small gaps) were established to observe whether gap setting can improve the soil fertility and plant diversity of forest plantations. The results showed that compared with the control, the soil organic matter content of different soil layers increased significantly in the medium forest gap and large forest gap. The content of soil organic matter in the surface layer of the middle gap had the largest increase (80.64%). Compared with the control, the content of soil-available potassium between different soil layers decreased significantly by 15.93% to 25.80%. The soil hydrolysable nitrogen reached its maximum under the medium gap. Soil moisture showed significant changes among different gap treatments, different soil layers and their interaction, decreasing significantly in large gaps and small gaps but increasing significantly in medium gaps. The soil bulk density decreased significantly compared with the control, and the surface soil reached the minimum in the medium gap. There were different plant species in forest gaps of different sizes, and shrub layer plants were more sensitive to gap size differences than herb layer plants. The plant diversity indices of the shrub layer increased significantly and showed a maximum under the medium gap. The plant diversity of the herb layer showed the opposite trend, and the Shannon-Wiener index, Simpson index and Pielou index were significantly lower than those of the control. RDA showed that different gap treatments had significant effects on the distribution of plants under the forest. Soil available potassium, soil moisture and soil bulk density affected the distribution and diversity of plants under the forest, serving as the limiting factors of plant growth. In forest management, if we strictly consider the improvement of plant diversity and soil physicochemical properties, these results suggest that a medium gap should be established in a plantation for natural restoration.