NOVELTY - Preparation of porous nanofiber-based microbial fuel cell anode film comprises mixing aniline, and deionized water to obtain mixed solution A, mixing initiator, surfactant and deionized water to obtain mixed solution B', soaking nanofiber in sodium hydroxide solution, controlling temperature, stirring, removing, adding cyanuric chloride and 1,4-dioxane, soaking, stirring, reacting, removing, repeated washing, soaking nanofiber in mixed solution A, adding mixed solution B', stirring, reacting, removing conductive nanofiber membrane from acetone, washing with water, and drying.    USE - Method for preparing porous nanofiber-based microbial fuel cell anode film (claimed).    ADVANTAGE - The anode film has good biocompatibility, good conductive properties, high specific surface area, high surface activity, and improved output power density. The simple and non-polluting method has mild reaction conditions, low production cost, and is suitable for large-scale application of microbial fuel cell.    DETAILED DESCRIPTION - Preparation of porous nanofiber-based microbial fuel cell anode film comprises mixing 0.005-0.5 g/mL aniline, 0.5-5 mol/L acid and deionized water to obtain mixed solution A, mixing 0.01-0.5 g/mL initiator, 0.005-0.5 g/mL surfactant and deionized water to obtain mixed solution B', soaking nanofiber in 3 mol/L sodium hydroxide solution at bath ratio of 1:30, controlling temperature at 30 degrees C, stirring for 1 hour, removing dry nanofiber membrane filter surface of solution, adding cyanuric chloride and 1,4-dioxane at mass ratio of 1:9, soaking nanofiber membrane in solution at 30 degrees C, stirring, reacting for 2 hours, removing dry nanofiber membrane filter, repeated washing with mixed solution of acetone and 1,4-dioxane for 1-5 minutes each, soaking nanofiber in mixed solution A at bath ratio of 1:20-1:200 for 5-30 minutes, adding mixed solution B' dropwise, stirring, reacting for 2-12 hours, removing in situ polymerized conductive nanofiber membrane from acetone, washing with water, and drying at 30-80 degrees C to obtain porous nano-fiber-based microbial fuel cell anode film. The acid is hydrochloric acid, sulfuric acid, nitric acid, phosphoric acid, dodecyl benzene sulfonic acid, salicylic acid or perchloric acid. The initiator is ammonium persulfate, potassium permanganate, potassium dichromate or ferric chloride. The surfactant is sodium dodecyl sulfate, sodium dodecyl benzene sulfonate, polyethylene glycol, polyvinylpyrrolidone or cetyl trimethyl ammonium bromide. The mixed solution comprises 1,4-dioxane at concentrations of 100 wt.%, 75 wt.%, 50 wt.%, 25 wt.% and 0 wt.%.