We describe a method for modeling constant-potential charges in heteroatomic electrodes, keeping pace with the increasing complexity of electrode composition and nanostructure in electrochemical research. The proposed "heteroatomic constant potential method" (HCPM) uses minimal added parameters to handle differing electronegativities and chemical hardnesses of different elements, which we fit to density functional theory (DFT) partial charge predictions in this paper by using derivative-free optimization. To demonstrate the model, we performed molecular dynamics simulations using both HCPM and conventional constant potential method (CPM) for MXene electrodes with Li-TFSI/AN (lithium bis(trifluoromethane sulfonyl)imide/acetonitrile)-based solvent-in-salt electrolytes. Although the two methods show similar accumulated charge storage on the electrodes, the results indicated that HCPM provides a more reliable depiction of electrode atom charge distribution and charge response compared with CPM, accompanied by increased cationic attraction to the MXene surface. These results highlight the influence of elemental composition on electrode performance, and the flexibility of our HCPM opens up new avenues for studying the performance of diverse heteroatomic electrodes including other types of MXenes, two-dimensional materials, metal−organic frameworks (MOFs), and doped carbonaceous electrodes.