Active monitoring of beehive using sensor network that can record all of the hive conditions for recognition of living status of beehives, could help beekeepers to make a proper decision while attacking foreign enemies, and prevent the collapse of the hive. To this end, in this study, an expert system for detection of Merops apiaster attack was developed which is including: temperature, sound, humidity and ethanol sensors. The data was collected for two conditions (i. e. normal and apiaster attack conditions) and different features in two time and frequency domains were extracted. After that, the most significant features were selected and classified using GA (Genetic Algorithm) and K-NN, respectively. According to results, among 19 selected features, 5 features namely spectral entropy, sound energy, sound maximum, alcohol minimum, and natural frequency were selected as the most effective features with 8967, 6018, 1321, 1287, and 809 occurrence, respectively. K-NN classification had 100% accuracy, precision, recall, Fscore, specificity, and Gmean and zero false positive rate which indicates proper performance of expert system for detection of apiaster attack to the beehives.