With the growing energy demands, the interdependence among multiple energy domains is increasing rapidly. The optimal dispatch of the different energy sources, storage systems, and flexible loads in a multienergy system is a challenging problem. This paper focuses on the co-optimization of a multi-energy system consisting of electrical and district heating networks to address the challenge. The electric boilers and heaters act as interconnecting elements between the two systems. Utilizing the available flexibilities in both systems, the cooptimization focuses on energy management to achieve economical operation and reduction in renewable curtailment. The algorithm uses the day-ahead forecast of renewable generation as well as electrical and heating demands to determine the optimal schedule for the various generation, storage, and flexible loads in both systems. A case study based on the multi-energy system at Bornholm Island, Denmark is presented in this paper. The results show a significant reduction in renewable power curtailment and a reduction in CO2 emissions achieved via the interconnected systems.