The study aims to effectively reduce building energy consumption, improve the utilization efficiency of building resources, reduce the emission of pollutants and greenhouse gases, and protect the ecological environment. A prediction model of heating ventilation air conditioning (HVAC) energy consumption is established by using back propagation neural network (BPNN) and adapted boosting (Adaboost) algorithm. Then, the HVAC system is optimized by building information modeling (BIM). Finally, the effectiveness of the urban intelligent HVAC optimization prediction model based on BIM and artificial intelligence (AI) is further verified by simulation experiments. The research shows that the error of the prediction model is reduced, the accuracy is higher after the Adaboost algorithm is added to BPNN, and the average prediction accuracy is 86%. When the BIM is combined with the prediction model, the HVAC programme of hybrid cooling beam + variable air volume reheating is taken as the optimal programme of HVAC system. The power consumption and gas consumption of the programme are the least, and the CO 2 emission is also the lowest. Programme 1 is compared with programme 3, and the cost is saved by 37% and 15%, respectively. Through the combination of BIM technology and AI technology, the energy consumption of HVAC is effectively reduced, and the resource utilization rate is significantly improved, which can provide theoretical basis for the research of energy-saving equipment.