ABSTRACTA single-chambered packing-type anaerobic fluidized microbial fuel cell (AFBMFC) with coking wastewater (CWW) as fuel was built to treat CWW, which not only has high treating efficiency, but also can convert organic matter in wastewater into electricity. AFBMFC was constructed by using anaerobic sludge that was domesticated as inoculation sludge, which was used to biochemically treat CWW. The organic compounds in CWW were extracted by liquid–liquid extraction step by step every day. The extraction phase was concentrated by a rotary evaporator and a nitrogen sweeping device and was analyzed by GC–MS. And the electricity-generation performances of AFBMFC were investigated. The results show that the composition of CWW was complicated, which mainly contains hydrocarbons, phenols, nitrogenous organic compounds, alcohols and aldehydes, esters and acids and so on. After a cycle of anaerobic biochemical treatment, the content of organic compounds in the effluent decreased significantly. After the treatment of AFBMFC, 99.9% phenols, 98.4% alcohol and aldehydes and 95.3% nitrogenous compounds were biodegraded. In the effluent, some new compounds (such as tricosane and dibutyl phthalate) were produced. The chemical oxygen demand (COD) of CWW decreased from 3372 to 559 mg/L in the closed-circuit microbial fuel cell, and the COD removal was 83.4 ± 1.0%. The maximum power density of AFBMFC was 2.13 ± 0.01 mW m−2.