Nanostructured materials have gained significant attention as anode material in rechargeable lithium-ion batteries due to their large surface-to-volume ratio and efficient lithium-ion intercalation. Herein, we systematically investigated the electronic and electrochemical performance of pristine and endohedral doped (O and Se) Ge12C12 and Si12C12 nanocages as a prospective negative electrode for lithium-ion batteries using high-level density functional theory at the DFT/B3LYP-GD3(BJ)/6-311 + G(d, p)/GEN/LanL2DZ level of theory. Key findings from frontier molecular orbital (FMO) and density of states (DOS) revealed that endohedral doping of the studied nanocages with O and Se tremendously enhances their electrical conductivity. Furthermore, the pristine Si12C12 nanocage brilliantly exhibited the highest Vcell (1.49 V) and theoretical capacity (668.42 mAh g− 1) among the investigated nanocages and, hence, the most suitable negative electrode material for lithium-ion batteries. Moreover, we utilized four machine learning regression algorithms, namely, Linear, Lasso, Ridge, and ElasticNet regression, to predict the Vcell of the nanocages obtained from DFT simulation, achieving R2 scores close to 1 (R2 = 0.99) and lower RMSE values (RMSE < 0.05). Among the regression algorithms, Lasso regression demonstrated the best performance in predicting the Vcell of the nanocages, owing to its L1 regularization technique.