We have examined the high-pressure behaviors of six-membered heterocyclic compounds of pyrimidine and s-triazine up to 26 and 26.5 GPa, respectively. Pyrimidine crystallizes in Pna2₁ symmetry (phase I) with the freezing pressure of 0.3 GPa, and transforms to another phase (phase II) at 1.1 GPa. Raman spectra of several compression-decompression cycles demonstrate there is a critical pressure of 15.5 GPa for pyrimidine. Pyrimidine returns back to its original liquid state as long as the highest pressure is below 15.1 GPa. Rupture of the aromatic ring is observed once pressure exceeds 15.5 GPa during a compression-decompression cycle, evidenced by the amorphous characteristics of the recovered sample. As for s-triazine, the phase transition from R-3c to C2/c is well reproduced at 0.6 GPa, in comparison with previous Raman data. Detailed Raman scattering experiments corroborate the critical pressure for s-triazine may locate at 14.5 GPa. That is, the compression is reversible below 14.3 GPa, whereas chemical reaction with ring opening is detected when the final pressure is above 14.5 GPa. During compression, the complete amorphization pressure for pyrimidine and s-triazine is identified as 22.4 and 15.2 GPa, respectively, based on disappearance of Raman lattice modes. Synchrotron X-ray diffraction patterns and Fourier transform infrared spectra of recovered samples indicate the products in two cases comprise of extended nitrogen-rich amorphous hydrogenated carbon (a-C:H:N).