Fish consumption has been considerably increased in Iran recently. On the other hand, the increase in aquatic ecosystem pollution can cause the accumulation of heavy metals in aquatic animals – the fish, in particular. Therefore, measuring the amount of heavy metals in fish is of great importance for consumers’ health. This study aimed to measure the amount of heavy metals (nickel, chromium, and cobalt) in wild and farmed carps (Cyprinus carpio) by using an ICP device. In this cross-sectional study which was performed in Hamadan province in 2018, 40 carp samples (20 wild carp samples and 20 farmed ones) were randomly collected from Anouch and Shirinsoo dams and from breeding centers of the province and, after completing the digestion phase, the amount of heavy metals in the samples were measured using the ICP device. The study results showed that the amounts of nickel metal in wild and farmed carps were equal to 0.108±0.086 and 0.102±0.108 mg/kg dry weight, respectively; and the amounts of chromium in wild and farmed fish samples were 0.348±0.396 and 0.136±0.074 mg/kg dry weight in muscle tissue, respectively. Cobalt metal was not observed in wild and cultured samples. According to the results from the statistical analysis, no significant difference was detected between wild and farmed fishes regarding contamination with nickel metal. However, a difference was found between wild and farmed fishes (P<0.05) regarding chromium. Taking into account the higher amount of nickel and chromium metals in the wild carp samples compared to the farmed ones, it was recommended that necessary measures be taken to control the sources responsible for polluting the aquatic environment and to prevent the penetration of industrial effluents and other polluting factors into the dams of Hamedan province in order for avoiding the increase in the amount of heavy metals in the province’s water sources.