Cloud computing is a vast area which uses the resources cost-effectively. The performance aspects and security are the main issues in cloud computing. Besides, the selection of optimal features and high false alarm rate to maintain the highest accuracy of the testing are also the foremost challenges focused. To solve these issues and to increase the accuracy, an effective cloud IDS using Grasshopper optimization Algorithm (GOA) and Deep belief network (DBN) is proposed in this paper. GOA is used to choose the ideal features from the set of features. Finally, DBN is developed for classification according to their selected feasible features. The introduced IDS is simulated on the Python platform and the performance of the suggested model of deep learning is assessed based on statistical measures named as Precision, detection accuracy, f-measure and Recall. The NSL_KDD, and UNSW_NB15 are the two datasets used for the simulation, and the results showed that the proposed scheme achieved maximum classification accuracy and detection rate.