Wanli is a popular tourist destination and the site of the Cape Yehliu Miocene Formation which features distinctive hoodoo outcrops.
The Ming dynasty loyalist Koxinga landed his troops at Wanli in 1661 to expel the Dutch from their northern strongholds while their principal fortress in Tainan was under siege.
In 1891, during Qing dynasty rule, the village was destroyed by military force as punishment for engaging in raids against Chinese camphor men and soldiers near Tokoham (modern-day Daxi).
This situation remained in place until the Republic of China took over administration of Taiwan at the end of World War II: Taihoku Prefecture became Taipei County, and Banri Village became Wanli Township.
Wanli is further subdivided into ten villages: Wanli (萬里里), Beiji (北基里), Guihou (龜吼里), Yehliu (野柳里), Dapeng (大鵬里), Huangtan (磺潭里), Shuangxing (雙興里), Xidi (溪底里), Kanjiao (崁腳里), and Zhongfu (中幅里).