Nuts are characterized by high nutritional value and are recommended as a part of a healthy diet. At the same time, toxic elements could also be found in them. In this research, we measured the content of As, Cd, Pb and Hg in a wide variety of edible nuts. To determine the As content, inductively coupled plasma mass spectrometry (ICP-MS) was applied. Cd and Pb were detected by the electrothermal atomic absorption spectrometry analytical technique (ETAAS) with Zeeman background correction, while atomic absorption spectrometry method (AAS) with the amalgamation technique in the case of Hg was used. The study material consisted of 120 samples without replications (10 for each subgroup) including the following nuts: almonds, Brazil nuts, cashew nuts, hazelnuts, macadamia nuts, peanuts, pecan nuts, pine nuts, pistachios and walnuts. Indicators such as the target hazard quotient (THQ), cancer risk (CR) and hazard index (HI) were used to assess the health risk. The highest median As, Cd, Pb and Hg contents were observed for pistachios (192.42 µg/kg), pine nuts (238.40 µg/kg), peanuts (82.06 µg/kg) and pecans (82.06 µg/kg), respectively. The exceedance of the established limits was found in the case of Pb for nine samples: macadamia nuts (221.49 µg/kg; 2350.94 µg/kg; 2581.43 µg/kg), pine nuts (266.33 µg/kg), peanuts (1353.80 µg/kg) and pecans (2689.13 µg/kg, 2758.26 µg/kg, 2992.29 µg/kg and 3169.41 µg/kg). Extremely high (>2500 µg/kg) Pb content was found in 33% of studied pecans imported from the USA. The health risk indicators did not identify increased health risk. This research is significant considering the food safety issues and indicates the need to regularly control the content of toxic elements in food, as well as to establish the specific limits for heavy metals content in nuts. The chemometric analysis included cluster analysis and principal component analysis (PCA). Cluster analysis made it possible to distinguish four subgroups on the basis of the ability to accumulate toxic elements: pine nuts, pecans, pistachios and other analysed nuts. PCA indicated primarily factor 1, distinguishing mainly pecans, macadamia nuts and peanuts. Chemometric analysis can be a useful tool in estimating the ability of different nut species to accumulate contaminants.