Mangrove forests as one of the most important coastal ecosystems provide important ecological and economic performance to the world, have been threatened by developmental human activities and subsequent land use changes. The present study aims to assess mangrove ecosystem health in Nayband Marine National Park, Iran using Mangrove Quality Index (MQI), in addition to analyse the effect of mangrove habitat quality on the genetic diversity of Parasesarma persicum the associated mangrove crab by amplified fragment length polymorphism (AFLP). Four stations were studied for mangrove quality index analysis as well as genetic analysis. The results of MQI survey based on hydrology, water, soil, biota criteria indicated moderate to low habitat quality of mangroves in the study area. Station 4 in the southern Nayband gulf showed highest impact by human activities and MQI of 0.7, indicating serious habitat alteration in this area. Station 2 in the northern part of Nayband gulf showed a moderate mangrove quality (MQI = 0.5). Based on the results of the AFLP genetic assessment, the estimated heterozygosity (He) of crabs was between 0.29 and 0.32 with a mean of 0.30. The highest genetic diversity was found at station 2, however, no complete population differentiation was observed between 4 stations. The analysis revealed a significant correlation between mangrove habitat alteration and heterozygosity reduction (p < 0.05). Based on the results of the present study, mangrove habitat destruction due to anthropogenic activities may directly reduce the genetic diversity of associated species of this ecosystem.