Maren Runchang pill (MRRCP) is a Chinese patent medicine used to treat constipation in clinics. It has multi-component and multi-target characteristics, and there is an urgent need to screen markers to ensure its quality. The aim of this study was to screen quality markers of MRRCP based on a "differential compounds-bioactivity" strategy using machine learning and network pharmacology to ensure the effectiveness and stability of MRRCP. In this study, UPLC-Q-TOF-MS/MS was used to identify chemical compounds in MRRCP and machine learning algorithms were applied to screen differential compounds. The quality markers were further screened by network pharmacology. Meanwhile, molecular docking was used to verify the screening results of machine learning and network pharmacology. A total of 28 constituents in MRRCP were identified, and four differential compounds were screened by machine learning algorithms. Subsequently, a total of two quality markers (rutin and rubiadin) in MRRCP. Additionally, the molecular docking results showed that quality markers could spontaneously bind to core targets. This study provides a reference for improving the quality evaluation method of MRRCP to ensure its quality. More importantly, it provided a new approach to screen quality markers in Chinese patent medicines.