Purpose Insufficient attention to the building’s structural safety conditions has led to loss of life and property as well as disastrous social impacts. Although some countries or regions have developed building structural safety management policies, they seem to lack a solid decision-making basis and efficiency. To address this, this paper aims to establish a data-driven framework to achieve the economic, efficient and accurate management of building structural safety. Design/methodology/approach This paper proposes a novel framework for hierarchical management of building structural safety using machine learning approaches. A case study in Chongqing, China, is adopted to demonstrate its application and prove its feasibility. The framework considers the database, prediction of structural safety, hierarchical management and iteration. Findings The results indicate the effectiveness of the proposed framework, which facilitates the prediction of an existing building’s safety condition using limited fundamental information, allowing for the design of hierarchical management that encompasses structure, mechanisms and management measures. Furthermore, iteration mechanisms introduced allow for continuous improvement and adaptation over time. Practical implications By introducing this framework, hierarchical management actions could be taken to distinguished buildings, optimizing resource allocation and enhancing the effectiveness of engineering decision-making for maintenance. This proposed framework also offers practical guidance for decisions regarding new building construction. Originality/value The proposed framework provides valuable insights for research and practice in intelligent and cost-effective hierarchical management of structural safety for buildings and contributes to urban renewal.