A microbial fuel cell (MFC) is a system that can integrate electricity generation and, at the same time, contribute to decontaminating wastewater, becoming an eco-friendly technology with the environment. In this research, microbial fuel cells with graphite and aluminum electrodes were used at different sizes: 9, 25 and 64 cm 2 , and a wastewater sample obtained from a rural location in Peru was used as substrate. The MFCs parameters of voltage, current and conductivity were monitored for 12 days, for the generation of electricity; and the parameters of Chemical Oxygen Demand (COD), Thermotolerant Coliforms, Turbidity and pH, for wastewater treatment. The MFCs with electrodes of 64 cm 2 were the ones that had the highest efficiency in the production of electricity, because they generated higher voltage, current and conductivitythroughout the days evaluated, with peaks of 0.22 V, 0.08 mA and 1.05 mS/cm, respectively. Likewise, a reduction in the content of COD, Thermotolerant Coliforms and Turbidity of the substrate used (70, 73 and 36%) was achieved, while the pH remained slightly stable, with values from 7.39 to 6.49 during the days evaluated. The MFCs are a promising approach to a sustainable future in which energy can be generated from the use of household wastewater, while simultaneously treating these effluents.