The novel pyrrole alkaloid alhagifoline A (1) together with the two known analogs pyrrolezanthine (2) and pyrrolezanthine-6-methyl ether (3) were isolated from the aerial part of Alhagi sparsifolia. Their structures were established based on spectral (HR-ESI-MS, (1) H and C-13 NMR, (1) H-(1) H COSY, HSQC, HMBC) data. Compounds 2 and 3 were isolated from the genus Alhagi for the first time.