New topochemistry in simple molecular systems can be explored at high pressure. Here we examine the binary nitrogen/hydrogen system using Raman spectroscopy, synchrotron X-ray diffraction, synchrotron infrared microspectroscopy and visual observation. We find a eutectic-type binary phase diagram with two stable high-pressure van der Waals compounds, which we identify as (N2)6(H2)7 and N2(H2)2. The former represents a new type of van der Waals host-guest compound in which hydrogen molecules are contained within channels in a nitrogen lattice. This compound shows evidence for a gradual, pressure-induced change in bonding from van der Waals to ionic interactions near 50 GPa, forming an amorphous dinitrogen network containing ionized ammonia in a room-temperature analogue of the Haber-Bosch process. Hydrazine is recovered on decompression. The nitrogen-hydrogen system demonstrates the potential for new pressure-driven chemistry in high-pressure structures and the promise of tailoring molecular interactions for materials synthesis.