Sediments in eight types of mangroves were sampled in the Leizhou Peninsula. Heavy metals were analyzed to investigate the effects on metal distribution of mangrove communities, to evaluate contamination levels, identify sources and relationships between the two. Results showed that mangrove communities have effects on most heavy metal distributions in sediments, especially in the sediment with shrub communities of Aegiceras corniculatum where the contents of many metals are highest. As, Cr and Ni were identified as metal pollutants of primary concern, while Cd was of no concern. Zn, Pb, As mainly originated from anthropogenic source while the other metals are geogenic. Heavy metal distributions were affected by the independent and joint effects of landscape and sediment context; landscape context explains more variations in heavy metals than does sediment physicochemical variables. Total sulfur, total phosphorus and total potassium in sediment, and the existence of paddy field and forest land within 2000 m around the sampling sites are significant variables also.