Background Pyridine, 3-aminopyridine, 4-dimethylaminopyridine, and N, N-dimethylamine are reactive bases that may be used in the preparation of the pharmaceutical ingredient alogliptin (ALO). They are considered as potentially genotoxic impurities (PGIs) since they contain electrophilic functional groups. Therefore, they should be monitored at the allowed limits in ALO. Objective The aim of this study was to develop a novel liquid chromatography-mass spectrometry (LC-MS) method to estimate quantities of pyridine, 3-aminopyridine, 4-dimethylaminopyridine, and N, N-dimethylaniline impurities in ALO drug material. Methods The separation was performed on Kromasil CN (250 mm x 3.9 mm, 3.5 mu m) column in reversed phase mode. The mobile phase was a mixture of water-methanol (55:45, v/v) containing 2.5 mM ammonium acetate and 0.1% formic acid. Impurities were detected by MS in selected ion monitoring mode at m/z = 80, 95, 122, and 123 for pyridine, 3-aminopyridine, N, N-dimethylaniline, and 4-dimethylaminopyridine, respectively. The flow rate of the method was 0.5 mL/min. Results The sensitivity of the method was excellent at levels much less than the allowed limits. The method had excellent linearity in the concentration ranges of Quantitation Limit (QL)-150% of allowed limits and coefficients of determination were above 0.9990. The recovery ratios were in the range of 93.56-110.28%. Conclusion Results showed good linearity, precision, accuracy, sensitivity, selectivity, robustness, and solution stability. The studied method was applied to test two samples of raw materials and one sample of tablets.