The invention discloses a microgrid running optimization system and method based on power and heat combined dispatching. Running restrains such as the output force characteristic, start, stop and climbing of a distributed type generator set and the charge and discharge characteristics of power and heat energy storage are comprehensively considered, a microgrid power and heat combined dispatching model containing a fan, a photovoltaic cell, a combined heat and power generation system, an electric boiler, a fuel cell and an energy storage (electrical energy storage and heat energy storage) is built, the 0-1 mixed integer nonlinear programming method is adopted for solving the optimal output force and total running cost of all units in the network, and power and heat dispatching contrastive analysis is carried out on the system and a traditional separated generation and combined generation optimization model. In addition, the influences of the heat and power reliability difference on the running are analyzed and discussed, and therefore the heat and power dispatching module is more reasonable, comprehensive and universal.