This study reports a magnetic-bead based microfluidic system to capture cholangiocarcinoma cells by using structurally well-defined heparan sulfate (HS) octasaccharides. Ten synthetic HS octasaccharides (from SCH-43 to SCH-52) were coated on magnetic beads for this study, respectively. An integrated microfluidic system equipped with micromixers, normally-closed valves, and microchambers was developed such that the entire cancer cell isolation process could be automated. The experimental results have revealed that SCH-45 and SCH-46 of 100 mu M-coated magnetic beads were capable to capture more than 70% of Huh28 cells, which is higher than the one by using epithelial cell adhesion molecule (EpCAM)-coated beads. Furthermore, they also exhibited high specificity toward target cells. It is the first time that HS octasaccharides were demonstrated as an excellent affinity reagent for cancer cell isolation.