Membrane-on-chip is of growing interest in a wide variety of high-throughput environmental and water research. Advances in membrane technology continuously provide novel materials and multi-functional structures. Yet, the incorporation of membrane into microfluidic devices remains challenging, thus limiting its versatile utilization. Herein, via micro-stereolithography 3D printing, we propose and fabricate a “fish gill” structure-integrated on-chip membrane device, which has the self-sealing attribute at structure-membrane interface without extra assembling. As a demonstration, metallic micromesh and polymeric membrane can also be easily embedded in 3D printed on-chip device to achieve anti-fouling and anti-clogging functionality for wastewater filtration. As evidenced from in-situ visualization of structure-fluid-foulant interactions during filtration process, the proposed approach successfully adopts the fish feeding mechanism, being able to “ricochet” foulant particles or droplets through hydrodynamic manipulation. When benchmarked with two common wastewater treatment scenarios, such as plastic micro-particles and emulsified oil droplets, our biomimetic filtration devices exhibit 2 ~ 3 times longer durability for high-flux filtration than devices with commercial membrane. This proposed 3D printing-on-membrane approach, elegantly bridging the fields of microfluidics and membrane science, is instrumental to many other applications in energy, sensing, analytical chemistry and biomedical engineering.