Covalent organic frameworks (COFs) have attracted increasing interest during the past decade owing to its potential application in many fields. Herein we report a COF involving both benzodiimidazole and hydroxyphenyl moieties synthesied through Schiff base condensation, in order to trigger their ionization response both under acid and basic conditions. As expected, the benzodiimidazole-COF exhibited pH-induced amphiphilic selective adsorption toward ionic organic dyes, evidenced by selective adsorption of negative methyl orange (256 mg/g) in acidic condition (pH = 3) and positive methyl blue (185 mg/g) in basic conditions (pH = 11), respelctively. This was reasonably ascribed to the elctrostatic interaction between ionic dyes and the ionized COF induced through the protonation of benzodiimidazole ring or the deprotonation of hydroxyphenyl unit. Meanwhile, the ordered micropore of the COF with a uniform size (1.45 nm) endows it with size-excluded adsorption selectivity. This work paves a facile way to construct COFs of amphiphilic selectivity in asdorbing ionic organic dye molecules from waste water.