Mangrove plants contain a variety of secondary metabolites, including flavonoids, polyphenols, and volatiles, which are important for their survival and adaptation to the coastal environment, as well as for producing bioactive compounds. To reveal differences in these compounds among five mangrove species’ leaf, root, and stem, the total contents of flavonoids and polyphenols, types and contents of volatiles were determined, analyzed and compared. The results showed thatAvicennia marinaleaves contained the highest levels of flavonoids and phenolics. In mangrove parts, flavonoids are usually higher than phenolic compounds. A total of 532 compounds were detected by a gas chromatography-mass spectrometry (GC-MS) method in the leaf, root, and stem parts of five mangrove species. These were grouped into 18 classes, including alcohols, aldehydes, alkaloids, alkanes,etc. The number of volatile compounds inA. ilicifolius(176) andB. gymnorrhiza(172) was lower than in the other three species. The number of volatile compounds and their relative contents differed among all three parts of five mangrove species, where the mangrove species factor had a greater impact than the part factor. A total of 71 common compounds occurring in more than two species or parts were analyzed by a PLS-DA model. One-way ANOVA revealed 18 differential compounds among mangrove species and nine differential compounds among parts. Principal component analysis and hierarchical clustering analysis showed that both unique and common compounds significantly differed in composition and concentration between species and parts. In general,A. ilicifoliusandB. gymnorrhizadiffered significantly from the other species in terms of compound content, while the leaves differed significantly from the other parts. VIP screening and pathway enrichment analysis were performed on 17 common compounds closely related to mangrove species or parts. These compounds were mainly involved in terpenoid pathways such as C10 isoprenoids and C15 isoprenoids and fatty alcohols. The correlation analysis showed that the content of flavonoids/phenolics, the number of compounds, and the content of some common compounds in mangroves were correlated with their salt and waterlogging tolerance levels. These findings will help in the development of genetic varieties and medicinal utilization of mangrove plants.