The fourth industrial revolution has resulted in the intelligent Internet of Things being widely used for home networking applications and smart infrastructure. Consequently, wireless connectivity has become essential in industrial and daily-life applications. Wireless communication is a continuously evolving technology that satisfies high-speed and ultra-low latency requirements. However, as multiple users utilize a single channel by sharing frequency and time, the service quality cannot be ensured owing to the interference from a congested network. Additionally, malicious attackers can compromise communication availability or destroy data integrity through jamming attacks, threatening human life and safety. Conventional jamming attack detection and response technology respond to attacks without detecting the type of jammer, exhibiting certain limitations in detecting and defending against an intelligent attack. This study proposes a novel jammer classification and effective defense (JCED) algorithm that can classify jamming attack types using machine learning (ML) and provide differential responses based on the jamming types. Depending on the jammer type, the JCED algorithm can adaptively select various response methods, ranging from simple retransmission to active battery-draining attacks. The experimental results verify that JCED exhibits 24.9% higher effective throughput and 23.4% lower energy consumption than the countermeasure detection and consistency algorithm (CDCA). Moreover, JCED improves the effective throughput by an average of approximately three times compared to CDCA in an environment with integrity violation attacks. Thus, the JCED is an effective defense mechanism against jamming attacks, ensuring digital information safety and high throughput.