The variation in CO2 flux from the forest floor is important in understanding the role of mangrove forests as a carbon sink. To clarify the effects of soil temperature and tidal conditions on variation in CO2 flux, sediment–atmosphere CO2 fluxes were measured between June 2012 and May 2013. We used the closed chamber method for two plots, with a 0.5 m difference in elevation (B, high elevation; R-B, low elevation), in a mangrove forest in south-western Japan. CO2 fluxes were highest in the warm season and showed a weak positive correlation with soil temperature in both forests. Estimated monthly CO2 flux showed moderate seasonal variation in accordance with the exposure duration of the soil surface under tidal fluctuation. Additionally, measured CO2 flux and soil temperature were slightly higher in the R-B plot than the B plot, although estimated annual CO2 flux was higher in the B plot than the R-B plot due to different exposure durations. These results suggest that variation in the exposure duration of the forest floor, which changes seasonally and microgeographically, is important in evaluating the annual CO2 flux at a local scale and understanding the role of mangrove ecosystems as regulators of atmospheric CO2.