A valid and reliable method based on ultra‐high‐performance liquid chromatography coupled with quadrupole time‐of‐flight mass spectrometry using electrospray ionization was established to identify chemical constituents in the ethanol extract of pigeon pea leaves. A total of 58 compounds were detected both in positive and negative modes. Among them, 42 compounds, including 16 flavones, 1 flavonol, 5 flavanones, 9 isoflavones, 1 coumarin, 1 lactone, 6 stilbenes, 2 chalcones, and 1 other compound, were unambiguously identified or tentatively assigned in view of the retention time, the molecular formula, as well as the fragmentation patterns. Moreover, eight sets of isomers were differentiated by the ion trap mass spectrometry based on the fragment ion differences or the abundance differences of the same fragment ions. The energy‐resolved mass spectrometry in light of the relative abundance of characteristic fragment ions was adopted in the study.