This paper presents a novel hierarchical Internet of Things (IoT)-based scheme for Microgrid-Enabled Intelligent Buildings to achieve energy digitalization and automation with a renewable energy self-consumption strategy. Firstly, a hierarchical structure of Microgrid-Enabled Intelligent Buildings is designed to establish a two-dimensional fusion layered architecture for the microgrid to interact with the composite loads of buildings. The building blocks and functions of each layer are defined specifically. Secondly, to achieve transparent information fusion and interactive cooperation between the supply-side and demand-side, a state transition mechanism driven by a combination of time and events is proposed to activate the real-time and mutual response of generation and loads dynamically. Thirdly, based on the above hierarchical fusion structure and data-driven state transition mechanism, a power balance control algorithm driven by a self-consumption strategy is further proposed to achieve the autonomous balance of supply and demand. Finally, the IoT Microgrid Laboratory at Aalborg University is introduced to show how to implement this novel hierarchical IoT-based scheme in a Microgrid-Enabled Intelligent Building, and the power consensus control method based on the state transition mechanism is verified to achieve a renewable energy self-consumption strategy.