The accelerated development of agricultural modernization has promoted the great changes in the types and quantities of energy demands of rural breeding industry and put forward higher requirements for the harmless and efficient use of manure. At present, there is no description of biogas production process in the optimal dispatching model of comprehensive energy system, so it is difficult to realize the accurate simulation of energy production process. In this paper, an optimal scheduling method of rural solar energy-biomass hybrid multi-energy complementary system for rural breeding industry is proposed based on the detailed model of biogas system. Firstly, the characteristics of equipment, energy supply structure and matching biogas system of the multi-energy system are described and modeled. Then, the biogas production model was incorporated into the optimal scheduling model, and the optimal scheduling model of the multi-energy system of the farm was proposed based on the energy use regulation and load temperature regulation strategies of the multi-energy system of the farm, which considered the energy production of biomass. The commercial optimization software Cplex was used to solve the model. The calculation results show that the biogas production model is incorporated into the optimal scheduling model, which can optimize the fecal biogas production capacity and realize the full utilization of the biomass energy in the farm. The scheduling model based on temperature control strategy and energy supply strategy can adjust the heat distribution in the case of insufficient heat supply capacity, maximize the production capacity and energy supply capacity of the system, and realize the full consumption of renewable energy in the farm.