Self-healing hydrogels with intrinsic self-healing ability, injectability, and biocompatibility have good potential in biomedical applications. The relevance between the self-healing ability and inner structure of hydrogels, however, has rarely been examined. The design criteria of self-healing hydrogels remain to be established. In this study, we utilized in situ small-angle X-ray scattering (in situ SAXS) and coherent X-ray scattering (CXS) to analyze the dynamics and gelation mechanism of three types of chitosan-based self-healing hydrogels with different dynamic interactions. In situ SAXS revealed the nucleation and growth mechanism for the gelling process, which has not been reported in a system of self-healing hydrogels. The critical nucleation radius (CNR) with different interactions could further influence the gelation rate and self-healing ability. Moreover, the continuous time-resolved CXS profile unveiled the dynamic behavior of different self-healing hydrogels in mesoscale, supported by rheological experiments. Information linking the rheological properties and structural changes could be useful in designing selfhealing hydrogels for biomedical applications.