Rapid growth of the internet facilitates various facilities in everyday lifestyle, but intrusion becomes a significant threat in internet usage. Thus, the detection of intrusion is essential for smooth and secure communication in a network. In literature, many techniques have been proposed for the detection of intrusion. But those techniques either complex or fails to provide better performance in a big data application. Therefore, this paper proposed a novel Hybrid Mayfly Apriori-Intrusion Detection mechanism for effective intrusion detection in big data applications. In the proposed mechanism, Mayfly optimization based Apriori is used to detect the intrusion. Unlike conventional classification based intrusion detection, in the proposed mechanism, the network data processed to form an apriori rule based on frequent itemset. The infrequent itemset or transactions are marked as an intrusion. Comparison with established algorithms such as Artificial Neural Network, Random Forest, K-Nearest Neighbour and Support Vector Machine analyses the efficacy of the suggested mechanism. Ultimately, the proposed mechanism has shown its effectiveness by providing better results as 97% accuracy, 99% precision, and 97% recall. Thus, this mechanism is more suitable for intrusion detection in big data. © 2022, The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature.