An azobenzene-containing porous organic framework (POF) was rationally designed and synthesized via Sonogashira-Hagihara coupling reaction. By virtue of high porous skeleton and azobenzene as light responsive group, this task-specific POF exhibits the reversible stimuli-responsive adsorption property triggered by UV irradiation and heat treatment. The initial Brunauer-Emmet-Teller (BET) surface area of this porous material is 571 m2 g−1, while the BET surface area after UV irradiation decreases to 550 m2 g−1 along with the reduction of micropores around 0.5 nm and 1.3 nm during the trans to cis isomerization process. Furthermore, CO2 sorption isotherms show a slight decrease, which is caused by the trans to cis conversion of azobenzene side group. It is worth mentioning that CO2 uptakes of POFs are almost constant for three cycles via alternating external stimuli to confirm the excellently reversible switchability of trans-to-cis isomerization.