A ‘pit in pit’ is a common problem in the excavation of foundation pits and yet this issue has not been researched systematically. The variability of its form not only complicates the condition of the surrounding stress and displacement fields, but also brings difficulty to design and construction. This paper analyses the surface subsidence features of pit-in-pit foundations based on the typical sand–cobble stratum in the Beijing area by applying finite-difference software. According to a comparison of three factors that affect the surface subsidence the most, a conclusion can be drawn that the depth of the inner pit is greater than the edge distance (from the inner pit to the wall of the outer pit), which is greater than the width of the inner pit. The application of stratum compensation theory to pit-in-pit engineering is discussed to analyse the relationship between the surface deformation and lateral displacement of retaining walls. The cause of inaccuracy is also discussed, although this was found to be within acceptable limits. The research findings provide guidance for engineering inspections and control during construction in pit-in-pit foundations in sand–cobble and other similar strata.