The aim of this study was to analyze and compare the Hg, Pb, Cd, and Mn levels in egg feed, soil, and water among laying hens, laying ducks, and free-grazing duck farms in contaminated and uncontaminated areas. This study revealed that the Hg concentration in the eggs of free-grazing ducks was significantly greater than that in the eggs of laying hens and ducks in both contaminated and uncontaminated areas. However, the Pb and Mn levels in the eggs of laying ducks and free-grazing ducks were significantly greater than those in the eggs of laying hens in the contaminated area. Unfortunately, the Hg, Pb, Cd, and Mn concentrations in the feed, soil, and water from these three farms in both areas were not significantly different (P > 0.05). Hg and Cd were confirmed to be enriched in the egg albumin fraction, while Pb and Mn were found mainly in the egg yolk. However, egg consumption from free-grazing duck farms was the riskiest to Hg, Pb, and Mn contamination in the contaminated area. Additionally, the ecological risk factor (ER) in the soil revealed that all the farms were at considerable to high environmental risk for Cd except for Hg and Pb. Although the potential ecological risk index (RI) indicated a moderate risk for all farms in both contaminated and uncontaminated areas, these results were not consistent with our hypothesis. Therefore, the information gained in this study could be useful for setting up mitigation strategies and making decisions about public health concerns related to health hazards, especially for ecological risk assessments of heavy metal contamination.