The performance of microbial fuel cells in terms of current production and waste removal depends on microbial electron transfer catalyzed by functional communities. Active energy harvesting using tunable electrical circuits in this study dramatically increased microbial fuel cell performance compared with passive harvesting using resistors. Operated under four different conditions under either high power or high current, active harvesting increased power output by up to 240%, current output by 45%, and Coulombic efficiency by 141%. Moreover, the dynamic harvesting created a selective pressure on the anodic biofilm and greatly shaped the microbial community and function. It promoted the enrichment of electroactive bacteria with higher efficiency of electron transfer and thereby improved reactor performance. Using both marker gene sequencing and metagenomics tools, the study revealed distinct clusters of microbial community on the anodic biofilm under different harvesting conditions, and the abundance of known electroactive bacteria Geobacter more than tripled in active harvesting condition. Similar trends were discovered in the increased abundance of c-type cytochrome genes associated with extracellular electron transfer. Statistical analysis showed strong positive correlations between the abundance of functional genes and electrochemical performance of reactors. Compared with 16S rRNA marker gene methods that only examine the general microbial community structure, metagenomics used here revealed more accurate structure information as well as the functions of microbial community.