SummaryIn the modern era, unmanned aerial vehicle (UAV) based wireless sensor networks (WSN) are rising technologies in wireless communication. Through UAV, the sensed data can be forwarded to the base station. However, the increase in network users leads to several malicious attacks on UAVs. Hence, it affects the performance of a WSN platform while transmitting private information through UAVs. Therefore, the proposed study intends to develop an effective malicious UAV detection approach using a machine‐learning algorithm. Initially, the deployed sensor nodes in WSN are utilized to collect the environmental data. These sensor nodes transmit the collected data to the UAV. During data transmission, the sensor nodes generate a feed packet (authentication parameter) and forward it to the UAV along with the sensed information. The feedback packet is encrypted through a proxy re‐encryption scheme to secure the input data. These encrypted packets with the sensed input data are then transmitted to the base station. Finally, the feedback packet is decrypted and attains the actual input information. From the received data, the classification is performed using a proposed support vector machine with a shuffled frog leap (SVM‐SFL) approach. The proposed approach is implemented with the NS3 Python tool, and the results are analyzed by evaluating several performance matrices. Compared with other existing methods, the proposed study obtained improved results in terms of accuracy (98.61%), precision (98.5%), sensitivity (98.63%), and F‐measure (98.62%).