The unsupported length has great influence on the stability of an underground cavity when constructing it in sandstone stratum with weak interlayer. To provide guidance for safe construction, the physical and mechanical parameters of sandstone are tested first, and then a numerical model considering the weak interlayer is established by using 3DEC to analyze the influence of unsupported length. It is found that the strength of slightly weathered sandstone with medium coarse grain is in the range of 59.5-116MPa, and the saturated compressive strength will reduce greatly. When there is little difference in the internal mineral composition, the strength reduction of rock sample shows a positive correlation with water absorption, while the elastic modulus and the Poisson’s ratio are less affected by it. Meanwhile, the tensile strength is about 1.25% of its compressive strength. The unsupported length has an impact on the disturbed zone of surrounding rock mass. The shorter unsupported length can reduce the deformation of surrounding rock mass, and the reasonable excavation footage should not be greater than 6m. The stress of bolt below the rock anchoring beam is great although the unsupported length has little impact on the stress change of bolt at this position. One thing should be point out is that the bolt stress at the weak interlayer is obviously greater than that in the vault, and the strength of support here should be strengthened.