Spiropyran (SP), which can respond to acid, ultraviolet irradiation, and mechanical force, has received great attention as a classic molecule for the construction of stimuli-responsive materials. However, the self-assembly behavior of SP with a tunable morphology has rarely been investigated. In the present work, a SP derivative bearing two carboxyl groups and one hydroxyl group was prepared and used as a model to investigate the optical properties, molecular self-assembly, and morphology of SP. This pH-responsive derivative could undergo a large morphology variation from a sphere- to a rodlike structure by adjusting the acidity. The indoline and pyridopyran fragments contributed to π-π stacking, whereas the carboxyl groups contributed to hydrogen bonding. Both π-π stacking and hydrogen bonding contributed to the pH-responsive self-assembly. The morphologies of spiropyran aggregates formed under different conditions were characterized by SEM, TEM, and FTIR spectroscopy. Control of the morphology of the spiropyran nanostructure was achieved.