In this work, we developed a novel molecularly imprinted solid-phase microextraction with capillary electrophoresis method for the selective extraction and determination of protoberberines in complicated samples. The imprinted monolith was prepared in a micropipette tip-based device by using acrylamide as the functional monomer, ethyleneglyoldimethacrylate as the cross-linker and dimethylsulfoxide as the porogen, and exhibited an imprinting factor of 2.41 to berberine, 2.36 to palmatine and 2.38 to jatrorrhizine. Good capillary electrophoresis separation was achieved by using 20 mM phosphate buffer at pH 7 as running buffer with the addition of organic modifier of 10% methanol. Parameters such as sample pH value, sample flow rate and sample volume were investigated for imprinted monolith-based solid-phase microextraction. An imprinted solid-phase microextraction with capillary electrophoresis method was developed, the method showed a wide linear range (0.3-50 μg/mL), good linearity (R ≥ 0.9947) and good reproducibility (relative standard deviations ≤ 0.73%), the limit of detection was as low as 0.1 μg/mL, which was lower than some reported methods based on capillary electrophoresis for protoberberines. The method has been applied for determination of three common protoberberines in Cortex Phellodendri Chinensis, by using a molecularly imprinted monolith as the selective sorbent, most of the matrices in the Cortex Phellodendri Chinensis sample were removed and three protoberberines were selectively enriched and well determined.