Rifampicin (RIF) is a kind of semi-synthetic antibiotic with broad-spectrum antibacterial action, which has remarkable antibacterial activity against many pathogenic microorganisms. The World Health Organization classifies RIF as critically important for human medicine, especially for tuberculosis treatment. The polymorphic nature of RIF contributes to the complexity of the impurities of the drug. Lack of systematic and comparative studies on its impurities in different crystal forms may affect the efficiency of this drug and increase the incidence of adverse reactions. Current methods in pharmacopoeias and literature can only separate a limited number of known impurities, and the process of preparing the mobile phase is highly cumbersome. In this work, response surface methodology was employed to optimize the conditions of one-dimensional liquid chromatography (LC) as an alternative approach to pharmacopoeia methods. This method demonstrated high accuracy and sensitivity, enabling the quantification of impurities as low as 0.25 μg/mL. The proposed method provided satisfactory linearity, percentage of recovery from 88 to 101 % with relative standard, deviations (RSD) lower than 5 %, indicating good precision. Additionally, the parallel determination of 6 sample solutions showed that the content changes of the relevant components were within an acceptable range, demonstrating method repeatability. A detection method based on high-resolution two-dimensional LC-mass spectrometry (2D-LC-MS/MS) was developed to analyze. A total of 25 impurities were identified and the impurity profiles were systematically investigated for the first time, providing experimental basis for the quality control of the drug.