Unmanned aerial vehicles (UAVs) are increasingly being deployed in crucial missions for the armed forces, law enforcement, industrial control monitoring, and other sectors. However, these hostile operating circumstances, along with the UAVs' dependence on wireless protocols, pose substantial security threats, limiting their mainstream application. With network security being such a major issue for UAV networks, the machine learning-based intrusion detection system (IDS) has been determined to be an effective strategy for protecting them. Additionally, though the existing methods offer effective strategies for detecting and categorizing abnormalities in the system, they are limited by their inability to adjust to various attack patterns. The dataset used as well as the memory and computational requirement of existing models, poses new challenges. One of the main concerns pertains to the reduced computational and memory demands of these models. So, the work carried out in this paper addresses this challenge. The work carried out in this paper addresses this challenge. A new dimensional reduction technique based on correlation coefficient, information gain, and principal component analysis (PCA) is introduced to reduce the dimensionality of the UAV Attack Dataset. A novel intrusion detection system based on an artificial neural network (ANN) and genetic algorithm (GA) is then proposed. The genetic algorithm is used to generate the optimal weights of the artificial neural network. A comparison is made between the proposed model and the backpropagation network and its variant in terms of its convergence and prediction accuracy. Furthermore, the performance of the proposed model is compared with that of other classifiers. This comparison reveals that the proposed model is time efficient with an increased prediction accuracy of at least 6% more than other classifiers.