Due to the sensitive and mission-critical nature of the data collected and transferred, security in IoT-assisted UAV networks is of great significance. Intrusion detection in IoT-assisted UAV networks includes the deployment of complex monitoring systems to identify and respond to cyberattacks, physical breaches, or unauthorized access. This system employs a combination of anomaly detection and signaturebased methods to find malicious or unusual activities within the network. A robust intrusion detection mechanism is essential for protecting the security and integrity of the UAVs and the data collected, ensuring that any possible vulnerabilities are promptly addressed and identified. Consequently, this study introduces an adaptive mongoose optimizer algorithm with a deep learning-based intrusion detection (AMOA-DLID) method in IoT-assisted UAV networks. The AMOA-DLID technique intends to ensure security in the IoTassisted UAV networks via an intrusion detection process. In the presented AMOA-DLID technique, AMOA is initially applied for the feature selection process. The following sparse autoencoder (SAE) model can be exploited for the recognition of the intrusions. Lastly, the recognition rate of the SAE model can be improved by employing the Harris Hawks optimizer (HHO) technique. The detailed experimental study of the AMOA-DLID model is performed on the benchmark dataset of IDS. The extensive results portrayed that the AMOA-DLID technique reaches improved security over other models on the IoT-assisted UAV networks.