The hydraulic system generating electricity by comprehensively utilizing bioenergy and wind energy is a closed hydraulic system and comprises a large windmill F, a speed increasing gearbox CI, a speedreduction gearbox CII, a first hydraulic pump PI, a second hydraulic pump PII, a biomass turbine G, a third hydraulic pump PIII, a fourth hydraulic pump PIV, a hydraulic motor MI, a generator DI, a fifth hydraulic pump PV, an incremental encoder, a PLC controller, a hydraulic oil tank, a filter, an energy accumulator and corresponding connectors. The first hydraulic pump PI and the third hydraulic pump PIII together supply oil to the hydraulic motor MI so as to drive the hydraulic motor MI to drive the generator set DI to generate electricity. During operation, the rotational speed of the generator DI is detected by the PLC controller in real time through the incremental encoder, and the displacement of the third hydraulic pump PIII is adjusted by the PLC controller in real time accordingto the detected rotational speed of the generator DI, so that the randomness and uncertainty when the large windmill F drives the first hydraulic pump PI to provide flow are offset.