Lithium ion battery is an important energy storage device especially, in electric vehicles due to its large capacity. However, heat generated from this battery during the high rate of charging and discharging process might lead to irreversible capacity loss and degrade the battery performance. This paper presents a thermal management system for a lithium ion battery to maintain a regulated thermal process in the battery pack. A robust control algorithm is proposed using particle swarm optimization (PSO) based fuzzy logic controller to the battery thermal management system. The system performance is evaluated by the overshoot, undershoot and settling time, and compared with the PID and simple fuzzy system to validate the results. From the performance results and comparisons, the proposed PSO based fuzzy system is able to yield the least overshoot of 0.497 % and settling time of 32 min 13 s during the heating subroutine, and undershoot of 0.975 % and settling time of 28 min 46 s during the cooling subroutine. Moreover, it is also capable of maintaining a uniform temperature among the battery modules in the pack. These results prove that the PSO based fuzzy system is a robust control system which enhances the performance of the lithium ion battery temperature regulating system efficiently.