The acid and base dual-responsive cucurbit[7]uril pseudorotaxanes have been designed and immobilized on the surface of hollow mesoporous silica nanoparticles as the supramolecular nanovalves to control the release of cargo molecules in response to extensive pH changes.