Increasing seawater temperatures and CO2 levels associated with climate change affect the shallow marine ecosystem function. In this study, the effects of elevated seawater temperature and partial pressure of CO2 (pCO2) on subtropical sediment systems of mangrove, seagrass, and coral reef lagoon habitats of Okinawa, Japan, were examined. Sediment and seawater from each habitat were exposed to four pCO2-temperature treatments, including ambient pCO2- ambient temperature, ambient pCO2-high temperature (ambient temperature + 4°C), high pCO2 (936 ppm)-ambient temperature, and high pCO2-high temperature. Parameters including primary production, nutrient flux, pigment content, photosynthetic community composition, and bacterial abundance were examined. Neither high temperature nor high pCO2 alone impacted mangrove and seagrass sediment primary production significantly (Tukey's test, P > 0.05). However, the combined stress significantly (Tukey's test, P < 0.01) increased primary production in these two habitats. In sediments from the coral reef lagoon, single and combined stress treatments induced a shift from heterotrophy to autotrophy. Significant increases in net primary production (Tukey's test, P < 0.01), and gross primary production (Tukey's test, P < 0.05) under the combined stress suggested that benthic microalgae in mangrove and seagrass sediments were more responsive to high temperature and pCO2 conditions than those in coral reef lagoon sediments. Additionally, combined stress significantly increased the sediment chlorophyll a content (Tukey's test, P < 0.05) in all habitats. These increases were associated with increased net primary production, indicating that combined stress stimulates primary production activity by the photosynthetic benthic microalgae in all habitats. Diatom activity increased, as silicate uptake increased in all habitats. Microbial abundance significantly increased under the combined stress treatment (Tukey's test, P 0.05) under the combined stress, suggesting that heterotrophic processes were less affected by the combined stress than autotrophic processes. In summary, mangrove and seagrass sediments minimize the negative impacts of elevated temperature and pCO2 via increased primary production and carbon storage. Lagoonal sediments also act as a carbon sink under temperature and ocean acidification stress.