The invention discloses a comprehensive energy utilization system for a farm, and belongs to the technical field of distributed energy application. The system comprises a feeder, a manure-grass separator, an acidification pool, a fermentation tank, a biogas slurry storage pool, a solid-liquid separator, a desulfurization and dehydration system, a gas storage tank, a generator set, a waste heat boiler, a lithium bromide unit, a solar collector, a hot storage tank, a solar photovoltaic module, a water pump, a reservoir and a torch, wherein the livestock and poultry manure is treated intensively,the biogas and solar energy are combined organically to produce cold, heat and electricity and meet farm electricity, production heat, domestic water, domestic heating, air conditioning refrigerationand other demands, the biogas slurry and a solid organic fertilizer can produce to replace the use of pesticides and fertilizers, so that livestock and poultry manure can be turned into wealth.