Microbial fuel cells could be used as an alternative for wastewater treatment and electricity generation. Escherichia coli is a representative bacterium that has been widely studied as a model in laboratory assays despite its limited ability to transfer electrons. Although previous studies have employed glucose and methylene blue in electricity production using E. coli, there remains a lack of understanding on how current generation would impact the production of metabolites and what the most appropriate conditions for current production might be. To shed light on those issues, this manuscript used a 32 factorial design to evaluate the effect of the concentration of organic matter (glucose) and the concentration of the mediator methylene blue (MB) using E. coli DH5α as an anodic microorganism. It was found that as the concentration of glucose was increased, the production of electricity increased and at the same time, its degradation percentage decreased. Similarly, a 17-fold increase in current production was observed with an elevation in methylene blue concentration from 0 to 0.3 mM, though inhibition became apparent at higher concentrations. The maximum power generated by the cell was 204.5 µW m−2, achieving a current density of 1.434 mA m−2 at concentrations of 5 g L−1 of glucose and 0.3 mM of MB. Reductions in the production of ethanol, lactate, and acetate were observed due to the deviation of electrons to the anode.