In this paper, the co-solvent of methanol–water was used to facilitate the sodium dodecyl sulfate (SDS) micelles collapse, thereby inducing the on-line sample focusing technique of micelle to solvent stacking (MSS). To demonstrate this stacking method, the mechanism of micelles collapse in co-solvent was discussed. The details of the required conditions were investigated and the optimized conditions were: running buffer, 20 mM H 3BO 3 and 20 mM NaH 2PO 4 solution (pH 4.0); micellar sample matrix, 20 mM SDS, 20 mM H 3BO 3 and 20 mM NaH 2PO 4 solution (pH 4.0); co-solvent buffer, 20 mM H 3BO 3 and 20 mM NaH 2PO 4 in methanol/water (90:10, v/v). The validity of the developed method was tested using cationic alkaloid compounds (ephedrine and berberine) as model analytes. Under the optimized conditions, this proposed method afforded limits of detection (LODs) of 0.5 and 1.1 ng/mL with 300 and 1036-fold improvements in sensitivity for ephedrine and berberine, respectively, within 15 min.