Alkaloids in Macleaya microcarpa were characterized systematically by combining liquid chromatography tandem mass spectrometry (LC–MS/MS) with the biosynthetic pathway of isoquinoline alkaloids. The mass spectral fragmentation behaviors of 16 references belonging to eight types of alkaloids that exist in the biosynthetic pathway of isoquinoline were investigated in detail. The benzyltetrahydroisoquinoline and aporphine alkaloids were distinguished by characteristic losses of the NHR1R2 (R1 and R2 represent the substituent groups of the nitrogen atom) radical and the fragment ions below m/z 200. Tetrahydroprotoberberine, N-methyltetrahydroberberine and protopine alkaloids were differentiated by the retro-Diels–Alder (RDA) reaction, α-cleavage and the [M–H2O]+ and [M–CH4]+ ions. Discrimination of protoberberine, benzophenanthridine and dihydrobenzophenanthridine-type alkaloids can be realized through the characteristic [fragment ion-2H]+, [M–H2O]+, [M–CH4]+, [M+H–CH3CH2CH2OH]+ and [M+H–CH3COCH3]+ ions. Forty-one alkaloids, including one benzyltetrahydroisoquinoline, one aporphine, nine protopines, seven protoberberines, one tetrahydroprotoberberine, three N-methyltetrahydroprotoberberines, five benzophenanthridines and fourteen dihydrobenzophenanthridines, were separated and identified simultaneously. Thirty-three of these were reported for the first time in M. microcarpa. The benzyltetrahydroisoquinoline, aporphine, tetrahydroprotoberberine and N-methyltetrahydroprotoberberine-type alkaloids have not been reported previously in M. microcarpa. This method can be applied to the analysis of herbal medicines that possess the biosynthetic pathway of isoquinoline alkaloids.