The Internet of Things (IoT) is determine enormous economic openings for industries and allow stimulating innovation which obtain between domains in childcare for eldercare, in health service to energy, and in developed to transport. Cybersecurity develops a difficult problem in IoT platform whereas the presence of cyber-attack requires that solved. The progress of automatic devices for cyber-attack classifier and detection employing Artificial Intelligence (AI) and Machine Learning (ML) devices are crucial fact to realize security in IoT platform. It can be required for minimizing the issues of security based on IoT devices efficiently. Thus, this research proposal establishes novel mayfly optimized with Regularized Extreme Learning Machine technique called as MFO-RELM model for Cybersecurity Threat classification and detection from the cloud and IoT environments. The proposed MFO-RELM model provides the effective detection of cybersecurity threat which occur in the cloud and IoT platforms. To accomplish this, the MFO-RELM technique pre-processed the actual cloud and IoT data as to meaningful format. Besides, the proposed models will receive the pre-processing data and carry out the classifier method. For boosting the efficiency of the proposed models, the MFO technique was utilized to it. The experiential outcome of the proposed technique was tested utilizing the standard CICIDS 2017 dataset, and the outcomes are examined under distinct aspects.