In recent years, several existing techniques have been developed to solve security issues in cloud systems. The proposed study intends to develop an effective deep-learning mechanism for detecting network intrusions. The proposed study involves three stages pre-processing, feature selection and classification. Initially, the available noises in the input data are eliminated by pre-processing via data cleaning, discretization and normalization. The large feature dimensionality of pre-processed data is reduced by selecting optimal features using the wild horse optimization-based feature selection (WHO-FS) model. The selected features are then input into a proposed dual-level flow optimized AlexNet-BiGRU detection model (DLFAB-IDS). Whereas the flow direction algorithm (FDA) approach optimally tunes the hyperparameters and helps to enhance the classification performance. In the proposed model, the intrusions are detected by AlexNet and the multiclass classification is performed through the BiGRU method. The proposed study used the NSL-KDD dataset, and the simulation was done by Python tool. The efficacy of a proposed model is measured by evaluating several performance metrics. The comparison over other existing techniques shows that the proposed model brings higher performance in terms of accuracy 96.81%, recall 95.84%, precision 96.24%, f1-score 96.75%, prediction time 0.43s and training time 152.84s.