Photosynthetic microbial mats are stable, self-supported communities. Due to their coastal localization, these mats are frequently exposed to hydrocarbon contamination and are able to grow on it. To decipher how this contamination disturbs the functioning of microbial mats, we compared two mats: a contaminated mat exposed to chronic petroleum contamination and a reference mat. The taxonomic and metabolic structures of the mats in spring and fall were determined using metagenomic and metatranscriptomic approaches. Extremely high contamination disturbed the seasonal variations of the mat. ABC transporters, two-component systems, and type IV secretion system-related genes were overabundant in the contaminated mats. Xenobiotic degradation metabolism was minor in the metagenomes of both mats, and only the expression of genes involved in polycyclic aromatic hydrocarbon degradation was higher in the contaminated mat. Interestingly, the expression rates of genes involved in hydrocarbon activation decreased during the 1-year study period, concomitant with the decrease in easily degradable hydrocarbons, suggesting a transient effect of hydrocarbon contamination. Alteromonadales and Oceanospirillales hydrocarbonoclastic bacteria appeared to be key in hydrocarbon remediation in the contaminated mat. Overall, the contaminated microbial mat was able to cope with hydrocarbon contamination and displayed an adaptive functioning that modified seasonal behaviour.