In spite of advances in greenhouse gas research, the spatiotemporal CH<sub>4</sub> and N<sub>2</sub>O dynamics of boreal landscapes remain challenging, e.g., we need clarification of whether forest–mire transitions are occasional hotspots of landscape CH<sub>4</sub> and N<sub>2</sub>O emissions during exceptionally high and low ground water level events. <br><br> In our study, we tested the differences and drivers of CH<sub>4</sub> and N<sub>2</sub>O dynamics of forest/mire types in field conditions along the soil moisture gradient of the forest–mire ecotone. Soils changed from Podzols to Histosols and ground water rose downslope from a depth of 10 m in upland sites to 0.1 m in mires. Yearly meteorological conditions changed from being exceptionally wet to typical and exceptionally dry for the local climate. The median fluxes measured with a static chamber technique varied from −51 to 586 μg m<sup>−2</sup> h<sup>−1</sup> for CH<sub>4</sub> and from 0 to 6 μg m<sup>−2</sup> h<sup>−1</sup> for N<sub>2</sub>O between forest and mire types throughout the entire wet–dry period. <br><br> In spite of the highly dynamic soil water fluctuations in carbon rich soils in forest–mire transitions, there were no large peak emissions in CH<sub>4</sub> and N<sub>2</sub>O fluxes and the flux rates changed minimally between years. Methane uptake was significantly lower in poorly drained transitions than in the well-drained uplands. Water-saturated mires showed large CH<sub>4</sub> emissions, which were reduced entirely during the exceptional summer drought period. Near-zero N<sub>2</sub>O fluxes did not differ significantly between the forest and mire types probably due to their low nitrification potential. When upscaling boreal landscapes, pristine forest–mire transitions should be regarded as CH<sub>4</sub> sinks and minor N<sub>2</sub>O sources instead of CH<sub>4</sub> and N<sub>2</sub>O emission hotspots.