In the context of integrated energy systems, the synergy between generalised energy storage systems and integrated energy systems has significant benefits in dealing with multi-energy coupling and improving the flexibility of energy market transactions, and the characteristics of the multi-principal game in the integrated energy market are becoming more and more obvious, but it is difficult to improve the flexibility of the transactions between “source-load-storage” in a one-way master–slave game structure, and the problem of how to establish an optimisation strategy for the coordination of integrated energy systems and energy storage systems is an urgent issue. How to establish a coordinated optimisation strategy of integrated energy system and energy storage system is an urgent problem. Therefore, this paper proposes a generalised shared energy storage and integrated energy system transaction optimisation method based on a two-stage game model, which improves the flexibility of the system transaction by constructing a two-stage game energy transaction model in which the subject acts as a leader and a gamer. Compared with the current one-way game model that does not consider the game on the energy storage side, the coordinated optimisation method proposed in this paper enables the energy storage side to participate more actively in the scheduling, which improves its revenue by 20.6%, the revenue on the energy-using side by 6.3%, and the overall revenue of the system by 5.4%, and at the same time, the load demand response regulation effect is more obvious, so the energy scheduling strategy proposed in this paper is able to weigh the interests of each subject and increase the overall economic benefits of the system.