We have developed Li-ion battery heating system which is direct resistance heating for hybrid electric vehicles (HEV), plug-in hybrid vehicles (PHEV) and electric vehicles (EV) by use of an inverter and a motor. One relay is added between a positive terminal of Li-ion battery and one-phase (e.g. U-phase) of a three-phase motor. When additional relay is turned on, the motor coils, IGBTs (Insulated-gate bipolar transistor) and diodes in the inverter and a smoothing capacitor for the inverter constitute buck-boost DC to DC converter. IGBTs are controlled to repeat charging and discharging between the battery and the smoothing capacitor. We made a system prototype and examined battery heating capability. And also we optimized charging and discharging frequency from impedance and current to improve heat generation. This method can increase battery temperature from −20 degrees C to 0 degrees C in 5 minutes and can extend EV driving range. Additionally the system can be installed into all HEV, PHEV and EV.