Emerging evidence suggests that there is extensive interaction between neurons and cancer cells. However, few model systems have been developed to investigate nerve-cancer cell interaction in vitro. Herein, a high-throughput microfluidic compartmentalized chip is developed to examine the interaction between neurons and cancer cells. The nerve bundles appear to provide a biophysical support for cancer cells and guide their directional migration. The cancers that have high levels of perineural invasion in clinical observations exhibit greater migration along neurites in the on-chip model. The on-chip model allows the screening of compounds which inhibit cancer cell migration along neurites in vitro. The interruption of neurites, the pharmacological blockade of nerve-cancer signaling, effectively attenuates the migration of cancer cells along neurites. This on-chip model provides a useful platform to investigate the dynamic interaction between cancer cells and neurons and can dramatically broaden the chemical space in screening neuron-related drugs for cancers.