The invention discloses a microbial fuel cell based method for treatment and detection of chromium-containing electroplating wastewater. The steps include: 1) injecting anaerobic sludge and a sodium acetate solution into an anode chamber of a two-chambered microbial fuel cell to inoculate microorganisms, injecting a cathode liquid into a cathode chamber, and connecting resistance at the cathode and the anode to form a closed loop, reacting the cell in a thermotank, injecting sodium acetate into the anode chamber each day till the output voltage is stable; 2) changing the anode chamber solution to an oxygen removed anode liquid, and changing the cathode solution to chromium-containing wastewater; and 3) after starting, adjusting the pH value of wastewater, injecting the wastewater into the cathode chamber, connecting the external resistance and starting the treatment process. The method provided by the invention realizes no direct contact of microorganisms and hexavalent chromium, avoids poisoning of hexavalent chromium on microorganisms, and makes microbiological treatment of high concentration hexavalent chromium wastewater become possible. The standard redox potential of hexavalent chromium is 1.33V, the microbial fuel cell is utilized to treat hexavalent chromium wastewater, and the purposes of synchronous wastewater treatment and electric energy recovery are realized.