The assessment of heavy metals' effects on human health is frequently limited to investigating the health consequences of a particular metal or a group of related metals. The effect of the heavy metal mixture on heart attack is unknown. The data for this study was derived from the National Health and Nutrition Examination Survey (NHANES) between 2011 and 2016. In this study, we used a Bayesian kernel machine regression model (BKMR) to investigate the link between heavy metal mixtures exposure in the blood and urine with heart attack. The rate of having heart attack showed a significant increase when all the metals were at their 60th percentile compared to their 50th percentile (estimated risk increase 0.3065 units), indicating a significant, positive association with a slight decrease in the highest concentration. Blood Cadmium and Mercury and urine Cobalt and Barium were found to be the most important exposure associated with heart attack. In our study, we discovered a link between heavy metal exposure and cardiovascular disease. In future studies, the BKMR model presented here can be used to investigate new combinations of exposures.