Coastal wetlands contribute to the mitigation of climate change through the sequestration of "blue carbon". Microbial necromass, lignin, and glycoproteins (i.e., glomalinrelated soil proteins (GRSP)), as important components of soil organic carbon (SOC), are sensitive to environmental change. However, their contributions to blue carbon formation and the underlying factors remain largely unresolved. To address this paucity of knowledge, we investigated their contributions to blue carbon formation along a salinity gradient in coastal marshes. Our results revealed decreasing contributions of microbial necromass and lignin to blue carbon as the salinity increased, while GRSP showed an opposite trend. Using random forest models, we showed that their contributions to SOC were dependent on microbial biomass and resource stoichiometry. In N-limited saline soils, contributions of microbial necromass to SOC decreased due to increased N-acquisition enzyme activity. Decreases in lignin contributions were linked to reduced mineral protection offered by short-range-ordered Fe (Fe SRO ). Partial leastsquares path modeling (PLS-PM) further indicated that GRSP could increase microbial necromass and lignin formation by enhancing mineral protection. Our findings have implications for improving the accumulation of refractory and mineral-bound organic matter in coastal wetlands, considering the current scenario of heightened nutrient discharge and sea-level rise.