SummaryCloud computing aids users for storing and recovering their information everywhere in the world. Security and efficiency are the two main issues in cloud service. Numerous intrusion detection techniques for the cloud computing environment were proposed, but those techniques do not effectively and accurately detect the attacks. Hence, an efficient and secure key management using extended convolutional neural network, that is, hybrid Enhanced Elman Spike convolutional Neural Network optimized with improved COOT optimization algorithm (Hyb EESCCNN) is proposed for intrusion detection in cloud system. Furthermore, the novel Adaptive Tangent Brakerski‐Gentry Vaikuntanathan Homomorphic Encryption (ATBGVHE) method is proposed for providing the security of the system. At first, SHA‐512 is used for authenticating cloud users to store its own information in to the cloud server. Then for Intrusion Detection (ID) the input data from the NSL‐KDD, UNSWNB15, CICIDS2018, and ToN‐IoT datasets are pre‐processed. The most relevant features are extracted using Fast Independent Component Analysis (Fast ICA) from the pre‐processed output. These extracted data are classified into malicious and non‐malicious data using Hyb EESCCNN. After classification, the non‐malicious data is secured using an ATBGVHE technique. The outcomes of the proposed methods shows that the NSL‐KDD datasets attains 99.9% higher accuracy, UNSW‐NB15 datasets offer 99.89% higher accuracy, CSE‐CIC‐IDS2018 datasets attains 99.8% higher accuracy, ToN‐IoT datasets attains 99.8% higher accuracy and 0.02 s lower encryption time compared with existing methods. Finally, case study with real time applications is also analyzed to prove the efficiency of the proposed method.