The construction of urban underpasses faces various spatial constraints, which will lead to deformation or failure of the structures if not satisfied. The introduction of BIM (Building Information Modeling) and other modern information technology to achieve rapid and accurate spatial constraint analysis of the design scheme is of great significance to ensure the quality and safety of the underpass and adjacent structures. Firstly, through extensive literature collection and survey, the key spatial constraint indicators of underpasses in dense urban spaces and the evaluation rules of each indicator are determined. Then, an SQL (Structured Query Language)-based database of spatial constraint rules for underpasses in dense urban space areas is constructed, and the spatial constraint analysis process for underpasses in dense urban space areas is proposed. Finally, based on Building Information Modeling, programming support, and a development environment provided by C# and Visual Studio, a spatial constraint analysis system for underpasses in dense urban space areas is developed to realize complex spatial constraint analysis functions. The application practice of the system is carried out by taking a city underpass project as an example. The results show that in the design of urban underpass engineering, the spatial constraint analysis system designed in this paper and the calculation method adopted can simplify the model transmission process, save on labor costs, and reduce the error of the calculation results.