Maximizing the fuel economy while lowering exhaust emissions highly depend on precise air-fuel ratio (AFR) control. The major challenge in the control of AFR is the time-varying delay, which is an inherent reason for performance degradation and instability. For analysis, the time delay is approximated by Padé approximation, leading to a non-minimum phase system that exhibits the difficulty of controlling due to its zeroes in the right half side of the s-plane. Moreover, dealing with uncertainties in fuel-path dynamics and minimizing the effect of external disturbances are key goals in the minimization of harmful emissions and maximization of fuel economy. This study puts forward an AFR control strategy in lean-burn spark-ignition (SI) engines by proposing a genetic algorithm (GA)-based proportional-integral (PI) control technique. The proposed PI controller aims at dealing with the aforementioned design challenges. The PI controller gains, namely, proportional (K_p), integral (K_i) gains are obtained with the proposed GA algorithm based on minimization of an objective function. The GA-based PI controller’s performance is analyzed with several methods in time-domain study. According to the obtained results, it has been revealed that the proposed GA-based PI controller improves the reference air-fuel ratio tracking performance in the existence of the time-varying delays in the closed-loop system, exhibiting good disturbance rejection properties, and is robust against system uncertainties. Thus, it can be effectively used for the accurate regulation of AFR under various operating conditions in SI engines.