The assessment of heavy metals' effects on human health is frequently limited to investigating one metal or a group of related metals. The effect of heavy metals mixture on heart attack is unknown. This study applied the Bayesian kernel machine regression model (BKMR) to the 2011-2016 National Health and Nutrition Examination Survey (NHANES) data to investigate the association between heavy metal mixture exposure with heart attack. 2972 participants over the age of 20 were included in the study. Results indicate that heart attack patients have higher levels of cadmium and lead in the blood and cadmium, cobalt, and tin in the urine, while having lower levels of mercury, manganese, and selenium in the blood and manganese, barium, tungsten, and strontium in the urine. The estimated risk of heart attack showed a negative association of 0.0030 units when all the metals were at their 25th percentile compared to their 50th percentile and a positive association of 0.0285 units when all the metals were at their 75th percentile compared to their 50th percentile. The results suggest that heavy metal exposure, especially cadmium and lead, may increase the risk of heart attacks. This study suggests a possible association between heavy metal mixture exposure and heart attack and, additionally, demonstrates how the BKMR model can be used to investigate new combinations of exposures in future studies.