The performance of the centrifugal compressor, which is the main component of the electric supercharger, significantly impacts the engine’s dynamics, economy, emissions, and responsiveness. The purpose of this paper is to enhance the aerodynamic performance of the centrifugal compressor of the electric supercharger for the two-stroke engine by optimizing the design of its impeller and diffuser parameters. The paper employs the numerical simulation method and applies the Spalart–Allmaras turbulence model to solve the RANS equations to analyze the impact of impeller-related parameters on the centrifugal compressor’s performance. Subsequently, the paper optimizes the initial model parameters based on the simulation results and confirms its performance through an experiment. The findings indicate that enhancing the isentropic efficiency and pressure ratio of the compressor can be achieved by increasing the number of blades on the impeller, selecting an appropriate blade backward angle, and increasing the relative outlet width. After optimization, the compressor’s efficiency can achieve 0.842, the pressure ratio can reach 1.49 with a working margin of 22%, and the efficiency is enhanced by 1.4%, while the pressure ratio is increased by 1.8% compared to the pre-optimization state. Moreover, the optimized model is experimentally validated to meet the design requirements.