Development of the new-generation membranes for tunable molecular separation requires materials with abilities beyond strict separation. Stimuli response could remotely adjust the membrane selectivity. Azobenzene derivatives can be photo-switched between trans and cis isomers under ultraviolet or visible light. Here, the azobenzenes were implanted as light switches to bridge the flexible cyclen building blocks. The smart covalent organic network membranes fold and unfold as origami that can be photo-switched between on-state (large) and off-state (small) pores. The cis membranes with off state under ultraviolet (UV) light have higher dye rejection than trans membranes with on-state channels. By controlling the trans-to-cis azobenzene isomerization via UV/Vis light, the pore size can be remotely controlled at the molecular level and the solvent permeance and dye rejection can be dynamically tuned.