To investigate the supramolecular interactions of the mechanically interlocked rotaxane pendants and conjugated polymer backbones, four analogous polymers were systematically synthesized by copolymerization of a 9-alkylidene-9H-fluorene monomer with various monomers, which contained a diketopyrrolopyrrole unit tethered with a dumbbell unit, a metalated rotaxane, a demetalated orthogonal H-bonded rotaxane, and a simple alkyl chain, to furnish P1, P2, P3, and P4, respectively. Prevailing 1H NMR and UV-vis to NIR titration profiles indicated that the novel polyrotaxane P3 showed a sensitive and reversible acid-base molecular switch capability via supramolecular interactions in contrast to the other polymers (P1, P2, and P4). Compared with the other polymers, P3 possessed a narrower bandgap, which was also confirmed by the computational study. Prominently, the monitoring of a controllable nanoself-assembly process of P3 was obtained by reversible acid-base molecular switch approaches. The orthogonal H-bonded pendant rotaxane unit and the steric demand of P3 judiciously allowed to morph into a hierarchical nanostructure via interconvertible H-bonds, anion-π and π-π stackings, and hydrophobic interactions.