Abstract Surrounding rock deformation measuring, which reveals the temporal and spatial evolution rules in deep roadway, is an effective method of preventing dynamic disasters in deep underground coal mines. The current roadway deformation measuring methods have deficiencies of long measurement interval, poor continuity and low-level automation. Therefore, in this paper, a real-time monitoring method and system of roadway deformation based on machine vision were established, and the multi-index early warning criterion of roadway deformation and failure was built. The real-time monitoring on the dynamic deformation of roadway was carried out using the deformation amount, speed and acceleration of surrounding rock as dynamic early warning indexes. The rock real-time image was automatically collected by the machine, processed to restore the current state of surrounding rock. According to the study of two cases in underground coal mines, the real-time monitoring method of roadway deformation system was applied and validated in Chang Gou Yu (CGY) and Zhang Shuang Lou (ZSL) Coal Mines for monitoring the surrounding rock dynamic deformation process. The multi-index early warning criterion of roadway deformation and failure was applied to evaluating the state of the surrounding rock and warning the instability of it. The results show that the indexes could reflect the state and development trend of surrounding rock deformation and failure. The dynamic characteristic, which was consistent with the stress concentration, could be used as the precursory information of surrounding rock instability. The machine vision roadway deformation real-time monitoring system could realize regional, continuous and real-time monitoring and early warning of underground roadway deformation.