This research presents a comprehensive assessment and comparison of various battery technologies employed in EVs, including lithium-ion, nickel-metal hydride, solid-state, lithium iron phosphate, and sodium-ion batteries. A novel approach integrating IoT sensors and machine learning is proposed to monitor and analyze battery performance under real-world driving conditions, with a strong emphasis on fire prevention and safety. Through an extensive literature review, the inherent characteristics, advantages, and limitations of each battery type are explored. IoT sensors deployed in EVs can collect real-time data on important factors, such as voltage, current, temperature, and state of charge (SoC). Machine learning algorithms process this data to realize degradation patterns, optimize battery management strategies, and enhance charging protocols. By leveraging data-driven insights, this research aims to improve battery efficiency, extend lifespan, and mitigate fire hazards. The proposed approach achieves a battery performance prediction accuracy of 99.4%, reduces fire risk by 72%, and improves overall battery efficiency by 18.6% compared to conventional methods. Ultimately, the findings will contribute to the development of safer and more sustainable EV battery technologies, shaping the future of eco-friendly mobility.