Mangroves adaptive plasticity in the changing environmental conditions is of vital importance for conservation management. Genetic diversity of mangrove brings about adaptive plasticity, enabling a species to cope with different habitat conditions. The Sundarbans of Bangladesh is the largest coastal wetland and mangrove forest with diversified habitat conditions that support a wide diversity of flora and fauna. Avicennia officinalis L. is the pioneer species in mangrove succession in the low-salinity, medium-salinity and high-salinity zones of the Sundarbans. Adopting RAPD-PCR analysis, the genetic diversity of A. officinalis was studied to explore the ecotypes of this species in the Sundarbans. The genetic distances of A. officinalis between the low-salinity and medium-salinity zones (0.50) and between the low-salinity and high-salinity zones (0.52) are significantly (p < 0.05) higher than that between the medium-salinity and high-salinity zones (0.09). The expected heterozygosity of A. officinalis of medium-salinity (0.54 ± 0.14) and high-salinity zones (0.55 ± 0.10) are higher than that of low-salinity zone (0.37 ± 0.12). The genetic diversity of A. officinalis of medium-salinity (0.5417 ± 0.3167) and high-salinity (0.5458 ± 0.3189) zones is significantly (p < 0.05) higher than that of low-salinity zone (0.3750 ± 0.2313). This genetic diversity of A. officinalis bears significant ecological consequences. A. officinalis growing in the low-salinity zone is the low salt-adapted ecotype while that growing in the medium-salinity and high-salinity zones is the high salt-adapted ecotype in the Sundarbans. These two ecotypes of A. officinalis are of both in-situ and ex-situ conservation importance for the Sundarbans and coastal plantations of Bangladesh to face the climate change induced salinity regime changes in the future.