In the internet era, network-based services and connected devices are growing with many users, thus it became an increase in the number of cyberattacks. Distributed Denial of Service (DDoS) attacks are the type of cyberattacks increasing their strength and impact on the victim. Effective detection of such attacks through a DDoS Detection System is relatively essential research. Although machine learning techniques have grown in popularity in the field of cybersecurity over the last several years, the change in the attack patterns in recent days shows the need for developing a robust DDoS prediction model. Therefore, we suggested a DDoS prediction system using a two-stage hybrid methodology. Initially, features are extracted by the unsupervised Deep Sparse Autoencoder (DSAE) using Elastic Net regularisation with optimum hyperparameters. Further, several learning models are tuned to classify attacks based on the extracted feature sets. Finally, the models’ performance is analysed with extracted features in balanced and imbalanced data scenarios. The experimental outcomes show that the suggested model outperforms current approaches. The model was evaluated on the CICIDS-2017 and CICDDoS-2019 datasets and achieved an accuracy of 99.98% and 99.99%, respectively.