An intelligent drug release system that is triggered into action upon sensing the motion of swarmer P. mirabilis is introduced. The rational design of the drug release system focuses on a pNIPAAm-co-pAEMA copolymer that prevents drug leakage in a tobramycin-loaded mesoporous silica particle by covering its surface via electrostatic attraction. The copolymer chains are also conjugated to peptide ligands YVLWKRKRKFCFI-NH2 that display affinity to Gram-negative bacteria. When swarmer P. mirabilis cells approach and come in contact with the particle, the copolymer-YVLWKRKRKFCFI-NH2 binds to the lipopolysaccharides on the outer membrane of motile P. mirabilis and are stripped off the particle surface when the cells move away; hence releasing tobramycin into the swarmer colony and inhibiting its expansion. The release mechanism is termed Motion-Induced Mechanical Stripping (MIMS). For swarmer B. subtilis, the removal of copolymers from particle surfaces via MIMS is not apparent due to poor adherence between bacteria and copolymer-YVLWKRKRKFCFI-NH2 system.