Matrine and oxymatrine are mainly obtained from Sophora flavescens using the high-temperature and prolonged solvent extraction methods currently employed in industries. In this study, an ultrafast and highly efficient method for extracting matrine and oxymatrine from S. flavescens at room temperature using laser technology, specifically, laser extraction, was demonstrated. The laser extraction rates for matrine and oxymatrine from S. flavescens at room temperature for 1 min were 266.40 and 936.80 mg(g·h)-1, respectively. These rates were 1400 times higher than those achieved with conventional solvent extraction. These results mean that 1 min of laser extraction is equivalent to 24 h of solvent extraction. The reason for such a high efficiency is that laser-induced cavitation can accelerate the rapid release of alkaloid molecules in plant cells. Mass spectrum, nuclear magnetic resonance, and Fourier-transform infrared spectrum analyses of the extracted matrine and oxymatrine compounds confirmed that they are the same as the products of solvent extraction. Furthermore, it was found that the anticancer activity of laser-extracted compounds is slightly better than that of conventionally solvent-extracted ones, likely due to the slight change in the microstructure or conformation of these compounds under laser irradiation. These findings demonstrated that the laser extraction method was ultrafast and highly efficient, unveiling a novel approach to alkaloid extraction. This discovery will have significant implications for the extraction and utilization of alkaloids from plants.