This study synthesized nitrogen-rich [5,6,5] fused compounds through a novel rearrangement reaction. Owing to its unique zwitterionic salt structure, rearrangement product 4-1 exhibits high thermal stability (Td > 250 °C), low sensitivity (IS > 40 J, FS > 360 N), and acceptable detonation velocities and pressures (νD = 8520 m s–1 and P = 32.53 GPa, respectively), which are better than those of TNT and TATB. These indicate the potential of zwitterionic salts as thermally stable energetic materials and provide new synthesis strategies for constructing fused polycyclic heterocycles through rearrangement.