This paper presents a general framework of modelling and online simulation for papermaking mill’s energy systems. The energy flow models of thermal power plant, DIP and paper machine for a papermaking mill was designed and implemented an online simulation. The traditional offline, closed and scattered modelling and simulation methods were changed into online, open and integrated forms. Through the analysis of energy systems of papermaking mills, the framework has implemented the followings. The unit (equipment) models were established, it can analyse the energy of energy flow material. The corresponding material flow models library was developed. The craftwork models were designed and the energy flow models library was developed of thermal power plant, DIP and paper machine. The mathematical models of unit (equipment), energy flow, exergy flow, thermal power plant, DIP and paper machine were built. The material properties database was developed. General simulation software architecture and online simulation software architecture were designed. The framework implemented online simulation, analysis, diagnosis and optimization for energy systems of whole papermaking mill. The practical application results are fine when the framework was applied in Guangzhou Paper Group Co., Ltd., and Gold East Paper (Jiangsu) Co., Ltd. The practical application results indicate that the emulation, simulation, analysis, diagnosis and optimization of material flow and energy flow for papermaking mill whole production process can be implemented by online simulation, and the purposes of maximizing the utility efficiency of material and energy resource, reducing resource, reusing and recycling can be achieved.