Porphyroxine, a trace alkaloid in opium, was identified in the early 1800s and isolated/characterized in the 1960s. Recently, two significant porphyroxine‐related byproducts found in the acidic and neutral extracts of illicit heroin were characterized by this laboratory as the N‐acetyl‐O14‐desmethyl‐epi‐porphyroxine (B) and N,O8‐diacetyl‐O14‐desmethyl‐epi‐porphyroxine (C). The prevalence of the B and C compounds has been consistent in the following order of abundance for the thousands of authentic heroin samples analyzed: Southwest Asia (SWA) > South America (SA) > Southeast Asia (SEA) > Mexico (MEX). In this research, a rapid and efficient ultra‐high performance liquid chromatography–tandem mass spectrometry (UHPLC–MS/MS) method was developed to determine the content of porphyroxine and five primary alkaloids (morphine, codeine, thebaine, noscapine, and papaverine) in opium after extraction with methanol/water (50/50). The method was validated in terms of linearity, accuracy, recovery, and precision for porphyroxine. The limit of quantitation (LOQ) for porphyroxine was 2.5 ng/mL. The developed method was successfully applied to a total of 114 authentic opium samples from the major poppy‐growing regions. The amount of porphyroxine was determined at the level of part per thousand (‰) and the relative concentrations to morphine were in the range of 1x10−4 and 1x10−2 with an order of SWA > SEA, SA > MEX for its average abundance, which is consistent with the order of the average abundance of its acetylated products (B, C) in illicit heroin. This study reveals the significance of porphyroxine and its acylated compounds in classifying heroin and opium samples to major geographical regions of production.