High pressure chemistry is known to inspire the creation of unexpected new classes of compounds with exceptional properties. Here we report the synthesis at ~90 GPa of novel beryllium polynitrides, monoclinic and triclinic BeN4. The triclinic phase, upon decompression to ambient conditions, transforms into a compound with atomic-thick BeN4 layers interconnected via weak van der Waals bonds consisting of polyacetylene-like nitrogen chains with conjugated {pi}-systems and Be atoms in square-planar coordination. Theoretical calculations for a single BeN4 layer show that its electronic lattice is described by a slightly distorted honeycomb structure reminiscent of the graphene lattice and the presence of Dirac points in the electronic band structure at the Fermi level. The BeN4 layer, i.e. beryllonitrene, represents a qualitatively new class of 2D materials that can be built of a metal atom and polymeric nitrogen chains and host anisotropic Dirac fermions.