Two new quinolizidine-based alkaloids (2 and 12), along with ten known ones (1, 3-11) were isolated from the roots of S. tonkinensis. Their structures were determined by spectroscopic data (including NMR, MS, IR, and UV), X-ray single crystal diffraction, electronic circular dichroism analyses (ECD), and comparing with related literatures. Compounds 1, 3-12 at non-toxic concentrations exhibited potent anti-inflammatory activities according to in vitro and in vivo anti-inflammatory tests. Among them, (-)-anagyrine (4), sophocarpine (8), 14β-hydroxymatrine (10), and 7β-sophoramine (12) showed more potent in vitro anti-inflammatory activities, and 5α,14β-dihydroxymatrine (2), (-)-anagyrine (4), sophocarpine (8), and 5α-hydroxymatrine (9) exhibited better in vivo anti-inflammatory effects.