Surfaces having dynamic control of interactions at the biological system-material interface are of great scientific and technological interest. In this work, a supramolecular platform with switchable multivalent affinity was developed to efficiently capture bacteria and on-demand release captured bacteria in response to irradiation with light of different wavelengths. The system consists of a photoresponsive self-assembled monolayer containing azobenzene (Azo) groups as guest and β-cyclodextrin (β-CD)-mannose (CD-M) conjugates as host with each CD-M containing seven mannose units to display localized multivalent carbohydrates. Taking the advantage of multivalent effect of CD-M, this system exhibited high capacity and specificity for the capture of mannose-specific type 1-fimbriated bacteria. Moreover, ultraviolet (UV) light irradiation caused isomerization of the Azo groups from trans-form to cis-form, resulting in the dissociation of the host-guest Azo/CD-M inclusion complexes and localized release of the captured bacteria. The capture and release process could be repeated for multiple cycles, suggesting good reproducibility. This platform provides the basis for development of reusable biosensors and diagnostic devices for the detection and measurement of bacteria and exhibits great potential for use as a standard protocol for the on-demand switching of surface functionalities.