Nanoporous anodic aluminum oxide (AAO) microcantilevers are fabricated and MIL-53 (Al) metal-organic framework (MOF) layers are directly synthesized on each cantilever surface by using the aluminum oxide as the metal ion source. Exposure of the MIL53-AAO cantilevers to various concentrations of CO2, N2, CO, and Ar induces changes in their deflections and resonance frequencies. The results of the resonance frequency measurements for the different adsorbed gas molecules are almost identical when the frequency changes are normalized by the molecular weights of the gases. In contrast, the deflection measurements show that only CO2 adsorption induces substantial bending of the MIL53-AAO cantilevers. This selective deflection of the cantilevers is attributed to the strong interactions between CO2 and the hydroxyl groups in MIL-53, which induce structural changes in the MIL-53 layers. Simultaneous measurements of the resonance frequency and the deflection are performed to show that the diffusion of CO2 into the nanoporous MIL-53 layers occurs very rapidly, whereas the binding of CO2 to hydroxyl groups occurs relatively slowly, which indicates that the adsorption of CO2 onto the MIL-53 layers and the desorption of CO2 from the MIL-53 layers are reaction limited.