Poly(triazine imide) (PTI) materials, a class of layered graphitic carbon nitrides, have garnered significant attention for their unique electronic, thermal, and catalytic properties. These properties can be adjusted through postsynthesis treatments. However, the influence of these treatments on the layer stacking modes and local structures within PTI remains largely unexplored. Herein, we demonstrate that low-dose electron microscopy can provide crucial insights into these previously unanswered questions. Utilizing integrated differential phase-contrast scanning transmission electron microscopy (iDPC-STEM) with carefully controlled electron doses, we achieved subangstrom resolution imaging of PTI materials. The obtained images reveal that acid treatments promote the transformation from AA'-stacking to AB- and ABC-stacking, with the latter being identified for the first time. Density functional theory calculations indicate that the replacement of intercalated cations is the primary driver of stacking mode transformation, while interlayer electrostatic interactions dictate the overall layer stacking. In addition, iDPC-STEM reveals the presence of Cl on the zigzag side surfaces of pristine PTI and its absence in acid-treated PTI. It also uncovers a Cl-deficient transition zone between AA'-stacking and AB-stacking regions, suggesting that the transformation of stacking modes is accompanied by the extraction and reintercalation of Cl ions.