In the context of wireless sensor networks (WSNs), prone to internal node attacks, this study advances an intrusion detection approach underpinned by evolutionary game theory. The attack-defense confrontation of sensor networks is mapped into the game process, and the attack-defense game model between malicious nodes and cluster head nodes is established. The traditional replication dynamic equation is improved, so that the cluster head node takes the historical strategies of other nodes in the evolutionary game process to predict the attack strategy of malicious nodes. At the same time, the improved replication dynamic equation is applied to the intrusion detection algorithm to improve the response time of the algorithm. Experiments show that compared with the replication dynamic equation of the traditional method, the evolutionary game can quickly reach equilibrium by using this algorithm, and the convergence speed is 80% higher than that of the traditional method, which ensures the network security and avoids the consumption of sensor network detection energy.