A molecular switch was developed to recognize and transport Cl- across lipid bilayers. The XRD-crystal structure and NOESY NMR spectra of a potent 4-aminoquinazoline analogue confirmed Cl--induced conformation changes. Systematic biophysical studies revealed that the quinazoline moiety forms cooperative interactions of H+ and Cl- ions with the thiourea moiety, resulting in the transport of H+/Cl- across the membranes. A pH-dependent analysis revealed that the transport of Cl- by the potent compound increased in an acidic environment. The potent compound could also transport H+/Cl- across Gram-positive bacteria, leading to antibacterial activities.