Cascaded nanophotonic devices play a vital role in all-optical connection, all-optical computation and all-optical network. However, there is almost no effective method for the direct design of on-chip cascaded nanophotonic devices, since current study of nanophotonic devices mostly focuses on single device. Here, on-chip cascaded nanophotonic devices are designed based on an intelligent algorithm by combining genetic algorithm, simulated annealing algorithm and finite element method for the first time, and verified experimentally by using silicon-based planar structures. The cascaded devices consist of a bandpass filter and a wavelength router operating in optical communication range. The operation bandwidth of the bandpass filter is 408 nm with transmission more than 80%, within which the communication wavelengths of 1,300 nm and 1,550 nm are routed into different output ports through the wavelength router component. The footprint is only 3.62 μm 2 for the bandpass filter and only 2.56 μm 2 for the wavelength router, which are easy for integration with planar structures and ultrasmall size. This work provides a highly-efficient scheme for the realization of on-chip cascaded nanophotonic devices on the same chip, and lays a foundation for the realization of photonic chip based on intelligent algorithm.