The electrocatalytic nitrate reduction to ammonia holds significant values for water remediations and energy applications, which quests for the development of highly effective catalysts with considerable stability and selectivity. Recently, high-entropy alloys (HEAs) are attracting growing attention for electrocatalytic processes. Nonetheless, studies of HEA-based nitrate reduction to ammonia are still at the early stage, and it remains unclear how the HEA compositions affect the adsorption and activation of the reaction intermediates. Herein, high-throughput density functional theory (DFT) calculations were integrated with machine learning to investigate the dependence of nitrate adsorption on the FeCoNiCuZn HEA structures. In particular, a total of 1268 different structures were sampled and constructed from the multidimensional configuration space, followed by the DFT calculations to investigate the Gibbs free energy of nitrate adsorption (i.e., ΔGNO3) on different surface microstructures. Four regression models were successfully developed, which can accurately predict ΔGNO3 using the HEA structures as the input features. Through the analysis of the feature importance, it was found that the active sites are crucial for nitrate adsorption; meanwhile, the local environments also play a considerable role. The dependence of the ΔGNO3 and adsorption geometries on the HEA compositions demonstrates that the compositional modulation of the HEA catalysts could be a promising avenue for facile adsorption and activation of reaction intermediates. Overall, this work will contribute to the probabilistic optimization of the HEA microstructures for enhanced electrochemical nitrate reduction.