Two [3]rotaxanes with an electron-rich pyrene moiety at the wheel and an electron-deficient naphthalenediimide (NDI) unit in the middle of the axle were prepared through "click chemistry", in which the intramolecular charge-transfer (ICT) process occurred between the pyrene moiety and the NDI unit, and the addition of acid and/or base can adjust the intensity of ICT.