An integrated smart microfluidic device consisting of nickel micropillars, microvalves, and microchannels was developed for specific capture and sorting of cells. A regular hexagonal array of nickel micropillars was integrated on the bottom of a microchannel by standard photolithography, which can generate strong induced magnetic field gradients under an external magnetic field to efficiently trap superparamagnetic beads (SPMBs) in a flowing stream, forming a bed with sufficient magnetic beads as a capture zone. Fluids could be manipulated by programmed controlling the integrated air-pressure-actuated microvalves, based on which in situ bio-functionalization of SPMBs trapped in the capture zone was realized by covalent attachment of specific proteins directly to their surface on the integrated microfluidic device. In this case, only small volumes of protein solutions (62.5 nL in the capture zone; 375 nL in total volume needed to fill the device from inlet A to the intersection of outlet channels F and G) can meet the need for protein! The newly designed microfluidic device reduced greatly chemical and biological reagent consumption and simplified drastically tedious manual handling. Based on the specific interaction between wheat germ agglutinin (WGA) and N-acetylglucosamine on the cell membrane, A549 cancer cells were effectively captured and sorted on the microfluidic device. Capture efficiency ranged from 62 to 74%. The integrated microfluidic device provides a reliable technique for cell sorting.