We investigated the structural, energetics, and electronic properties of the pristine/doped α- and γ-(graphyne, BNyne and BC2Nyne), based on density functional theory. Our results regarding the stability of these structures indicate that the formation energy is increased by doping the α- and γ-(graphyne or BNyne) structures with boron-nitrogen (B–N) or carbon (C) atoms, respectively. The lowest formation energy for the α- and γ-BC2Nyne structures were those with the highest number of B–N and C–C bonds, and hexagonal C rings bonded by B–N bonds, respectively. This is due to the low energy associated with the triple bond between B–N atoms, compared to the triple bond between C atoms. An examination of dynamic stability using phonon frequencies revealed that certain α- and all γ-structures studied exhibit stability. The structures with the lowest formation energies exhibited positive phonon frequencies. From the perspective of the electronic structure, it can be observed that the band gaps for α-structures are directly proportional to the number of B–N bonds present within the unit cell. For γ-structures, the band gaps depend on the composition of the hexagons present in the unit cell and the types of atoms that bond them.