In recent decades, mangrove wetlands globally have suffered from human activities and climate change, leading to issues like area reduction, degraded ecological functions and declining biodiversity. Restoration efforts, primarily through mangrove afforestation (i.e. mangrove plantation in mudflats), have been widespread, yet they often overlook the significance of unvegetated mudflats. In addition, under the condition that the total area of suitable mudflats is limited, the problem of what is the threshold of mangrove forest and unvegetated mudflats to better protect mangrove biodiversity has not been solved. Therefore, this study conducted a field survey of molluscs in mangrove wetlands in Hainan Island in China, and explored the relative importance of mangrove and unvegetated mudflats through taxonomic alpha diversity and functional diversity. The results showed that: (1) Mollusc abundance of unvegetated mudflats were notably higher than this of mangrove forests, and the species richness, functional richness and functional vulnerability were significantly lower than those of mangrove forests; (2) The abundance and functional vulnerability of molluscs were mainly affected by sediment properties (pH, interstitial water salinity, median diameter, total nitrogen, C/N ratio) , while the species richness and functional richness of molluscs were primarily influenced by vegetation structure (plant density); (3) Retaining at least 20% of the unvegetated mudflat area could well protect the biodiversity of mangrove wetlands. To our knowledge, our study is the first to propose the proportion of mangrove forests and unvegetated mudflats on the basis of benthic biodiversity, providing theoretical support and decision-making reference for mangrove protection and restoration.