The bandgap of a semiconductor is significantly regulated by pressure. Novel structures and properties are introduced upon compression. To figure out the bandgap evolution and phase transition of Ca3N2 under pressure, Raman spectra, UV–Vis absorption spectra and theoretical calculations were performed up to 50 GPa. Pmn21 structure emerges after 11.7 GPa, and it coexists with Ia-3 structure until 14.1 GPa. Totally transformation into P-3m1 occurs at 22.8 GPa. Under pressure, the bandgap undergoes a complicated shift that widens before 13 GPa and narrows after 14 GPa. The competition between the shorten bond length and the enhanced orbitals coupling is responsible for the non-monotonic change in the bandgap. Our results offer fresh insight into the high pressure behavior of alkaline-earth metal nitride compounds with the example of Ca3N2.