Nitrogen hydrides, e.g., ammonia (NH3), hydrazine (N2H4) and hydrazoic acid (HN3), are compounds of great fundamental and applied importance. Their high-pressure behavior is important because of their abundance in giant planets and because of the hopes of discovering high-energy-density materials. Here, we have performed a systematic investigation on the structural stability of N-H system in a pressure range up to 800 GPa through evolutionary structure prediction. Surprisingly, we found that high pressure stabilizes a series of previously unreported compounds with peculiar structural and electronic properties, such as the N4H, N3H, N2H and NH phases composed of nitrogen backbones, the N9H4 phase containing two-dimensional metallic nitrogen planes and novel N8H, NH2, N3H7, NH4 and NH5 molecular phases. Another surprise is that NH3 becomes thermodynamically unstable above ~460 GPa. We found that high-pressure chemistry of hydronitrogens is much more diverse than hydrocarbon chemistry at normal conditions, leading to expectations that N-H-O and N-H-O-S systems under pressure are likely to possess richer chemistry than the known organic chemistry. This, in turn, opens a possibility of nitrogen-based life at high pressure. The predicted phase diagram of the N-H system also provides a reference for synthesis of high-energy-density materials.