Accretionary prisms are mainly composed of ancient marine sediment scraped from the subducting oceanic plate at a convergent plate boundary. Large amounts of anaerobic groundwater and natural gas, mainly methane (CH4) and nitrogen gas (N2), are present in the deep aquifers associated with an accretionary prism; however, the origins of these gases are poorly understood. We herein revealed regional variations in CH4 and N2 production processes in deep aquifers in the accretionary prism in Southwest Japan, known as the Shimanto Belt. Stable carbon isotopic and microbiological analyses suggested that CH4 is produced through the non-biological thermal decomposition of organic matter in the deep aquifers in the coastal area near the convergent plate boundary, whereas a syntrophic consortium of hydrogen (H2)-producing fermentative bacteria and H2-utilizing methanogens contributes to the significant production of CH4 observed in deep aquifers in midland and mountainous areas associated with the accretionary prism. Our results also demonstrated that N2 production through the anaerobic oxidation of organic matter by denitrifying bacteria is particularly prevalent in deep aquifers in mountainous areas in which groundwater is affected by rainfall.