Microbial fuel cells (MFCs) represent a promising technology for sustainable energy generation, which leverages the metabolic activities of microorganisms to convert organic substrates into electrical energy. In oil spill scenarios, hydrocarbonoclastic biofilms naturally form at the water-oil interface, creating a distinct environment for microbial activity. In this work, we engineered a novel MFC that harnesses these biofilms by strategically positioning the positive electrode at this critical junction, integrating the biofilm's natural properties into the MFC design. These biofilms, composed of specialized hydrocarbon-degrading bacteria, are vital in supporting electron transfer, significantly enhancing the system's power generation. Next-generation sequencing and scanning electron microscopy were used to characterize the microbial community, revealing a significant enrichment of hydrocarbonoclastic Gammaproteobacteria within the biofilm. Notably, key genera such as Paenalcaligenes, Providencia, and Pseudomonas were identified as dominant members, each contributing to the degradation of complex hydrocarbons and supporting the electrogenic activity of the MFCs. An electrochemical analysis demonstrated that the MFC achieved a stable power output of 51.5 μW under static conditions, with an internal resistance of about 1.05 kΩ. The system showed remarkable long-term stability, which maintained consistent performance over a 5-day testing period, with an average daily energy storage of approximately 216 mJ. Additionally, the MFC effectively recovered after deep discharge cycles, sustaining power output for up to 7.5 h before requiring a recovery period. Overall, the study indicates that MFCs based on hydrocarbonoclastic biofilms provide a dual-functionality system, combining renewable energy generation with environmental remediation, particularly in wastewater treatment. Despite lower power output compared to other hydrocarbon-degrading MFCs, the results highlight the potential of this technology for autonomous sensor networks and other low-power applications, which required sustainable energy sources. Moreover, the hydrocarbonoclastic biofilm-based MFC presented here offer significant potential as a biosensor for real-time monitoring of hydrocarbons and other contaminants in water. The biofilm's electrogenic properties enable the detection of organic compound degradation, positioning this system as ideal for environmental biosensing applications.