B4N is expected to be a superhard material with outstanding mechanical properties like B4C. The longstanding uncertainty in its stable structural information impeded the understanding of its physical and chemical properties. Here, we systematically investigated the thermodynamically stable phases of B4N and their corresponding functional properties by using the particle swarm optimization method combined with first-principles calculations. Two new icosahedra-based B4N phases that different from the rhombohedral boron carbide type structure were predicted to be more thermodynamically stable in the pressure range of 0–300 GPa. Their dynamical stability has been identified by the theoretical phonon dispersion curves. By contrast, the long-assumed rhombohedral boron carbide type structure of B4N was currently determined to have much higher formation enthalpy and large imaginary phonon branches at zero pressure. As a result, it is obviously less stable than the newly predicted two phases. The calculated electrical and mechanical properties of these two new phases show that they possess both metallic and superhard characters, which will stimulate further high-pressure studies on synthesis and characterization.