Quartz is capable of capturing heavy metals (HMs); however, alkaline metals compete with HMs for active adsorption sites during coal combustion. Therefore, this study investigated the influence of alkaline metals (Na2CO3, NaCl, and CaO) on the adsorption behavior of HMs (Pb, Cd, Cu, and Zn) onto quartz via tube furnace combustion experiments and the CASTEP module based on density functional theory (DFT). The results showed that the addition of Na2CO3 and NaCl was disadvantageous for the retention of HMs in the ash, particularly NaCl. With the increase in NaCl from 0 to 5 wt%, the immobilization efficiencies for Pb and Cd progressively declined from 33.99% and 37.78% to 9.89% and 12.04%, respectively. As the temperature increased from 800 °C to 1200 °C, the fixation rates of Cu, Zn, Pb, and Cd decreased by 19.96%, 27.75%, 23.35%, and 20.68%, respectively, when Na2CO3 was present in the coal. The results of the DFT demonstrated that the adsorption energy of alkali metals on quartz-α(001) surfaces was much greater than that of HMs, thus adversely affecting the adsorption of HMs. The adsorption energy of Na2O reached as high as −924.70 kJ/mol, while that of HMs was generally below −650 kJ/mol. This work contributed to a deeper understanding of the fate, migration, and transformation of HMs, thereby facilitating the mitigation of HMs release and subsequent associated ecological risks.