Two novel multilevel switchable rotaxanes containing an ammonium and a triazole station have been constructed by a CuI-catalyzed azide–alkyne cycloaddition reaction. The macrocycle of rotaxane containing a C6-chain bridge between the two hydrogen bonding stations exhibits high selectivity for the ammonium cation in the protonated form. Interestingly, the macrocycle is able to interact with the two recognition stations when the bridge between them is shortened. Upon deprotonation of both rotaxanes, the macrocycle moves towards the triazole recognition site due to the hydrogen-bond interaction between the triazole nitrogen atoms and the amide groups in the macrocycle. Upon addition of chloride anion, the conformation of rotaxane is changed because of the cooperative recognition of the chloride anion by a favorable hydrogen-bond donor from both the macrocycle isophthalamide and thread triazole CH proton.