In lean combustion mode, exhaust gas ratio (EGR) is a significant factor that affects fuel economy and combustion stability. A proper EGR level is beneficial for the fuel economy; however, the combustion stability (coefficient of variation (COV) in indicated mean effective pressure (IMEP)) deteriorated monotonously with increasing EGR. The aim of this study is to achieve a trade-off between the fuel economy and combustion stability by optimizing the EGR set-point. A cost function (J) is designed to represent the trade-off and reduce the calibration burden for optimal EGR at different engine operating condi-tions. An extremum-seeking (ES) algorithm is adopted to search for the extreme value of J and obtain the optimal EGR at an operating point. Finally, a map of optimal EGR set-value is designed and experimentally validated on a real driving cycle.