Mangrove forests are one of the most effective carbon assimilation and storage ecosystems, providing crucial ecosystem services in coastal regions. However, they face potential threats from climate change, human activities, as well as their interactive effects, which have not yet been well investigated. In this study, we investigated net ecosystem production (NEP) of a temperate mangrove forest next to salt-production ponds in South Australia. The hypersaline salt ponds next to the land side of the mangrove forest create a salinity gradient in the forest. The study was based on eddy covariance measurement of carbon flux from November 2017 to December 2019, along with a salinity stress index (SSI), a new sea/land breeze index (Wb), and flooded fraction (F). The result shows significant difference in mangrove NEP between seaside and landside sources, which can be attributed to salinity difference and tidal inundation. The negative impact of salinity stress on mangrove NEP can be mitigated by tidal flooding but the tidal flushing effect is limited toward the landside end. Additionally, an optimal temperature range (16–24 °C) is identified, above and below which the NEP rate reduces, and this range is lower than that reported for mangroves in tropical and subtropical areas. The negative impact of high temperature on NEP can be slightly relieved by sea breezes. At this particular mangrove site, sea level rise may enhance salt flushing and thus the carbon sink. The carbon flux data measured in this study provide a baseline before a dieback event in 2020, aiding in assessing losses and informing temperate mangrove management in salinity-affected areas.