With the ever-increasing capacity of renewable energy, wind and solar energy curtailment has become prominent, which could limit further development of renewable energy. To solve this problem in distributed networks, the output characteristics of renewable energy and the sequential variation characteristics of load are analyzed. Based on that, a combined heating and power system, which consists of renewable energy, electric boiler, gas boiler and heat exchanger, is presented. As a coefficient is introduced to measure the curtailment of wind and solar energy, the optimal operation model of the combined heating and power system is established with minimizing the system running cost as the objective function, considering energy balance, limits of renewable energy curtailment, output of units and the operation requirement of distributed system. The optimization model based on Matlab calling Cplex solver is applied to case IEEE 33 to obtain the optimal curtailment of renewable energy, electric boiler output, gas consumption and operation cost. And then results are compared with separation supply of heat and power. Results show that in typical winter days combined heating and power system is effective in cutting operation cost by using the wind and solar energy to generate heat, which also promotes the accommodation of renewable energy and contributes to less natural gas consumption.