Tropical ecosystems play an important role in the environment. Coastal areas are subjected to a wide range of impacts and pollution, which have drawn worldwide attention over the past few decades. Comprehensive studies of heavy metal content in soils worldwide are extremely important for assessing and predicting ecological risks. Very few studies have been devoted to a complete study of the physicochemical characteristics of soils, assessment of heavy metal accumulation in coastal zones along the Djibouti coast, and potential ecological risks. The study investigated the physico-chemical characteristics of soil, assessed the accumulation of heavy metals in coastal zones along the Djibouti coast, and analyzed the potential environmental risks associated with the presence of heavy metals in the studied soils. Analysis of heavy metals and trace elements in the soils of the coastal areas of Djibouti revealed that the levels of these elements are lower than in soils of the Red Sea coast and are in line with WHO and other international standards. All heavy metals in the soil of the studied area demonstrate low levels of potential ecological risk. The soils of the studied areas, overall, have not undergone significant heavy metal pollution and can be considered suitable for various types of use.