In this paper, gear ratios of a two-speed transmission system are optimized for an electric passenger car. Quasi-static system models, including the vehicle model, the motor, the battery, the transmission system, and drive cycles are established in MATLAB/Simulink at first. Specifically, since the regenerative braking capability of the motor is affected by the SoC of battery and motors torque limitation in real time, the dynamical variation of the regenerative brake efficiency is considered in this study. To obtain the optimal gear ratios, iterations are carried out through Nelder-Mead algorithm under constraints in MATLAB/Simulink. During the optimization process, the motor efficiency is observed along with the drive cycle, and the gear shift strategy is determined based on the vehicle velocity and acceleration demand. Simulation results show that the electric motor works in a relative high-efficiency range during the whole drive cycle. The energy economy of the case-study vehicle is therefore further improved by utilizing the optimized a two-speed transmission, compared to that of the baseline vehicle with fixed-ratio reduction gear, demonstrating the feasibility and effectiveness of the proposed optimization.