In order to improve reliability of the excavator’s hydraulic system, an online fault detection approach based on dynamic principal component analysis (PCA) was proposed. With this approach, normal samples were used as training data to develop a dynamic PCA model online with new data. Secondly, T2 statistic and Q statistic performed as indexes of online fault respectively. Several experimental faults were introduced to validate the approach, and the dynamic PCA model developed were able to detect overall faults using T2 statistic and Q statistic. By experiment analysis, the proposed approach achieved an accuracy of 95% for 20 test samples. Experimental results shows that the online fault detection approach could effectively applied to the excavator’s hydraulic system.