Formed by linking metals or metal clusters through organic linkers, metal-organic frameworks are a class of solids with structural and chemical properties that mark them out as candidates for many emerging gas storage, separation, catalysis and biomedical applications. Important features of these materials include their high porosity and their flexibility in response to chemical or physical stimuli. Here, a copper-based metal-organic framework has been prepared in which the starting linker (benzene-1,3,5-tricarboxylic acid) undergoes selective monoesterification during synthesis to produce a solid with two different channel systems, lined by hydrophilic and hydrophobic surfaces, respectively. The material reacts differently to gases or vapours of dissimilar chemistry, some stimulating subtle framework flexibility or showing kinetic adsorption effects. Adsorption can be switched between the two channels by judicious choice of the conditions. The monoesterified linker is recoverable in quantitative yield, demonstrating possible uses of metal-organic frameworks in molecular synthetic chemistry as 'protecting groups' to accomplish selective transformations that are difficult using standard chemistry techniques.