Transition metal compounds (TMCs) have attracted considerable attention as cathode catalysts for Li-CO2 and Li-air batteries. However, the traditional trial-and-error approach of material design can lead to long and complex research cycles due to the enormous number of transition metal candidates. Here an iterative machine learning (ML) workflow is demonstrated to accelerate the discovery of high-performance cathode catalysts for Li-CO2 batteries, the effectiveness of which is additionally validated by experiments. By iteratively supplementing training data sets under the guidance of machine learning models, this method allows for direct prediction of overpotentials, an important performance metric for catalysts. From 15,012 transition metal compositions, three TMC catalysts were selected and synthesized, and experimental verification shows that the predictive model achieved a mean absolute error of only 0.106 V. Among them, Co0.1Mo0.9N exhibits the best performance and is further subjected to comprehensive mechanism analysis and electrochemical evaluation in Li-CO2 and Li-air batteries. The optimal catalyst, Co0.1Mo0.9N, exhibits low overpotentials of 0.55 and 0.65 V at 50 mA g-1 in Li-CO2 and Li-air batteries, respectively. Co doping reconstructs the electronic structure of MoN, promoting electron transfer and improving catalytic performance. This approach provides a potential pathway for the accelerated screening of new battery catalysts and promotes laboratory sustainability.