A two-speed transmission system integrated with an inner rotor hub motor, including an inner rotor hub motor, a steering knuckle, a fastening screw, a first transmission casing, a second transmission casing, a screw, a first planetary gear train, a second planetary gear train, a first electromagnetic brake, a second electromagnetic brake, a tire, a wheel rim, a rim bolt, a rim nut, a wheel hub, a shaft end bolt, a brake disc and a brake caliper. This invention also provides an electric vehicle, which balances the requirements for dynamics performance and driving economics and achieves better overall performances. The two-speed transmission system of this invention realizes gear shifting and long-term no-power parking braking.