Based on the reality of the office building, this paper establishes a micro and dynamic simulation model of energy consumption, which combines four factors: human factors, energy management policy, energy management technology and electrical equipment. More than that, this paper uses AnyLogic to simulate the energy consumption of an office building at the university. After validating the validity of this model, this paper designs different simulation experiments to find out the influence of energy saving consciousness and energy management strategy on energy consumption, which provides valuable suggestions for the actual energy problems of the office building.