Due to their complexity and often harsh working environment, air compressors are inevitably exposed to a variety of faults and defects during their operation. Thus, condition monitoring is critically required for early fault recognition and detection to avoid any type industrial failures. In this paper, an intelligent algorithm for reciprocating air compressor fault diagnosis is developed using real-time acoustic signals acquired from an air compressor with one healthy and seven different faulty states such as leakage inlet valve (LIV), leakage outlet valve (LOV), non-return valve (NRV), piston ring, flywheel, rider-belt and bearing defects. The proposed algorithm mainly consists of three steps: feature extraction, selection, and classification. For feature extraction, experimental acoustic signals are decomposed using maximal overlap discrete wavelet packet transform (MODWPT) by six levels into 64 wavelet coefficients (nodes). Thereafter, time domain features are calculated for each node to build each air compressor’s health state feature matrix. Each feature matrix dimension is reduced by selecting the most useful features using Harris hawks optimization (HHO) in the feature selection step. Finally, for feature classification, selected features are used as inputs for random forest (RF), ensemble tree (ET) and K-nearest neighbors (KNN) to detect, identify, and classify the compressor health states with high classification accuracy. Comparative studies with several feature extraction and selection methods prove the proposed approach’s efficiency in detecting, identifying, and classifying all air compressor faults.