The invention relates to a reactor of a microbial nitrogen and phosphorus recovery battery for water treatment and belongs to the technical field of water treatment. The reactor comprises a shell, an anode, a cation exchange membrane, a cathode, an anion exchange membrane and the like, wherein the cation exchange membrane and the anion exchange membrane sequentially divide the inner cavity of the reactor into an anode chamber, a nitrogen and phosphorus extraction chamber and a cathode chamber; an anode is suspended in the anode chamber, a cathode is fixedly arranged on the side wall of the cathode chamber, and the bottom of the anode chamber is communicated with the bottom of the cathode chamber through a pipeline; and the anode is connected with the cathode through a wire. The reactor provided by the invention can be simultaneously used for realizing purification of domestic wastewater, electricity production, nitrogen and phosphorus removal and struvite generation and is simple in structure, easy to operate and maintain, low in energy consumption, high in efficiency and convenient for industrialized production and practicality.