NOVELTY - Preparation of a biogas comprises laboratory simulating a biological methane; determining by anaerobic bacteria or yeast an aerobic-anaerobic bacteria with fermentation; and preparing biogas to the target area provided with an oxygen-free atmosphere by drilling in white rot fungi bacterial liquid, monitoring air leakage of reaction produced, adjusting the white rot fungi and mine water and culture medium, degrading the residual coal, and directly injecting culture medium.    USE - Method for preparation of a biogas (claimed).    ADVANTAGE - The method is suitable for any environment, with or without oxygen, the oxygen free. The fungi has good adaptability to the environment, is inexpensive, and increases coal degradation rate and methane output.    DETAILED DESCRIPTION - Preparation of a biogas comprises:    (A) collecting data for geology, mining, and taking coal and water sample; and carrying out anaerobic flora detection to the water sample;    (B) laboratory simulating a biological methane at an original temperature, pH, and mineralization condition; using coal without water and oxygen for preparing biogas sample, and taking methane as unit coal output amount; and determining most suitable culture medium formulation containing the strain to enrichment culture and coal mine water;    (C) providing a sample in the laboratory experiment, the sample at the same time provided an aerobic-anaerobic bacteria degradation mode, at the same time adding rot fungus liquid, water sample, and culture medium in the coal sample; and determining the best material adding proportion;    (D) determining by anaerobic bacteria or yeast an aerobic-anaerobic bacteria with fermentation; and    (E) preparing biogas to the target area provided with an oxygen-free atmosphere by drilling in white rot fungi bacterial liquid, monitoring air leakage of reaction produced, injecting gob, sealing well, monitoring the change of the gas component and concentration, adjusting the white rot fungi and mine water and culture medium, degrading the residual coal, and directly injecting culture medium in the area of water sample operation.