An on-chip gene expression analysis compartmentalized in droplets was developed for detection of cancer cells at a single-cell level. The chip consists of a keyhole-shaped reaction chamber with hydrophobic modification employing a magnetic bead-droplet-handling system with a gate for bead separation. Using three kinds of water-based droplets in oil, a droplet with sample cells, a lysis buffer with magnetic beads, and RT-PCR buffer, parallel magnetic manipulation and fusion of droplets were performed using a magnet-handling device containing small external magnet patterns in an array. The actuation with the magnet offers a simple system for droplet manipulation that allows separation and fusion of droplets containing magnetic beads. After reverse transcription and amplification by thermal cycling, fluorescence was obtained for detection of overexpressing genes. For clinical detection of gastric cancer cells in peritoneal washing, the Her2-overexpressing gastric cancer cells spiked within normal cells was detected by gene expression analysis of droplets containing an average of 2.5 cells. Our developed droplet-based cancer detection system manipulated by external magnetic force without pumps or valves offers a simple and flexible set-up for transcriptional detection of cancer cells, and will be greatly advantageous for less-invasive clinical diagnosis and prognostic prediction.