Melamine (1,3,5-triazine-2,4,6-triamine) was deposited on the Ag(111) surface under ultrahigh vacuum conditions. It forms two different monolayer structures, which were investigated by low energy electron diffraction and scanning tunneling microscopy. The α-phase is a honeycomb structure containing two molecules per unit-cell. The molecular orientation within the unit-cell is determined by six hydrogen bonds. The α-phase is kinetically preferred upon deposition at room-temperature and can be transferred to the thermodynamically more stable β-phase by annealing at 333 K. The β-phase has an oblique unit-cell containing four molecules and shows a higher surface density with additional hydrogen bonds between adjacent amino groups. Both structures are commensurate. While the structural motif of the α-phase has been observed before on Au(111) and Ag-Si(111) surfaces, the structure of the β-phase has been so far only theoretically predicted.