Rifampicin, essential for long-term tuberculosis treatment, requires rigorous control of non-therapeutic impurities due to their potential adverse, including mutagenic effects. Reports on control strategies for genotoxic impurities in rifampicin have been limited. This study introduced an analytical method to identify potential genotoxic impurities from the synthesis of raw materials. The structure of the 25-deacetyl-23-acetyl-rifampicin genotoxic impurity was confirmed using nuclear magnetic resonance, high-resolution mass spectrometry (HRMS), and high-performance liquid chromatography (HPLC). An HPLC-HRMS method was established and validated for detecting another genotoxic impurity, 1-amino-4-methylpiperazine, adhering to the International Council on Harmonization guidelines, which include specificity, linearity, detection and quantification limits, accuracy, precision, and robustness. These developments improve the quality control strategy for genotoxic impurities in rifampicin, ensuring product safety.