In view of problems that existing coal mine machinery online monitoring and diagnosis technology did not realize online extraction of fault characteristics and automatic identification of fault types, an online fault diagnosis and early warning system for coal mine rotating machinery based on LabVIEW was designed. The system analyzes vibration signal by means of spectrum analysis, power spectrum analysis, envelope spectrum analysis and cepstrum analysis, and obtains characteristic parameters of each component in running process of the rotating machine, and compares it with characteristic parameters in fault type database to realize fault diagnosis. Two kinds of fault diagnosis modes are designed including fine diagnosis and rough diagnosis, the two modes are associated by interlocking. If structural parameters of the main components of rotating machine are known, the fine diagnosis mode can be selected,otherwise, the rough diagnosis mode can be selected. Performance of the system is verified by simulating rotor unbalance fault of rotating machine, and the results show that the system can accurately identify faults and issue prompts with simple operation and high reliability.