The application of internet of things (IoT) devices in 5G/B5G has benefited many industries, such as automated production, smart agriculture and autopilot, and has provided access to billions of smart devices. However, the rapid growth of IoT devices has also brought network security issues. The purpose of this paper is to study the network intrusion detection model based on quantum artificial fish population and fuzzy kernel clustering algorithm. In this paper, the network intrusion detection model based on traditional fuzzy C‐means (FCM) clustering has poor classification effect and is prone to local extremum. A semi‐supervised fuzzy kernel–clustering algorithm based on quantum artificial fish group is proposed. The algorithm adopts a small amount of tag data and many unknown tag data to generate the classification of network intrusion detection and constructs a new objective function of FCM algorithm by means of kernel distance. In the simulation experiment of KDD Cup 99 network intrusion detection data, compared with the intrusion detection model based on FCM, particle swarm optimization‐FCM, the detection rate of the proposed algorithm in the known attack and unknown attack is 92.5% and 84.9%, respectively. The results show that the proposed intrusion detection algorithm has better detection rate.