Summary Mangroves play an integral role as a metal accumulator in tropical and subtropical marine ecosystems. Twenty-one sets of sediment samples and portions of mangroves were collected along the Saudi Arabian coast of the Red Sea to assess the accumulation and ecological risks of heavy metals. Results showed that the following mean concentrations of heavy metals in sediments: Cr (46.14 μg g−1 ± 18.48) > Cu (22.87 μg g−1 ± 13.60) > Ni (21.11 μg g−1 ± 3.2) > Pb (3.82 μg g−1 ± 2.46) > Cd (0.75 μg g−1 ± 0.87). The maximum concentrations of the studied metals were above the threshold effect level, indicating a limited impact on the respective ecosystems. The maximum concentration of Cd exceeded its toxic effect threshold, revealing a harmful risk to biota in the sediments. Based on metallo-phytoremedation, biological concentration factors were >1, suggesting that Avicennia marina can accumulate heavy metals, especially Cr and Pb. The translocation factor was above the known worldwide average. The geo-accumulation index revealed that sediments in mangrove areas ranged from moderately to heavily contaminated with Cd at Al-Haridhah and moderately contaminated at South Jeddah, Rabigh, Duba, and the wastewater treatment station near Jazan. The ecological risk index revealed that Cd could pose a relatively very high risk to the mangrove ecosystem. The present study emphasized the possibility of establishing a framework for the management of the coastal aquatic ecosystems along the Red Sea coast of Saudi Arabia.