Monocyanopolyynes and dicyanopolyynes can be synthesized quite easily by the submerged electric arc. Monocyanopolyynes having the general formula H[bond](C[triple bond]C)n[bond]C[triple bond]N can be synthesized together with ordinary polyynes series H[bond](C[triple bond]C)n[bond]H by arcing graphite electrodes in acetonitrile. Dicyanopolyynes N[triple bond]C[bond](C[triple bond]C)n[bond]C[triple bond]N are produced almost pure by arcing graphite electrodes directly into liquid nitrogen. These molecules are present in the envelope of post-AGB (asymptotic giant branch), carbon-rich giant stars and also in dark molecular clouds. They are incorporated into comets and also into other primitive materials and may play a role in the prebiotic synthesis of more complex organic molecules having a biological significance. Furthermore, the cyanopolyynes are involved in the atmospheric chemistry of some bodies of the solar system. The discovery of the easy formation of these molecules under laboratory conditions may explain why these molecules are so ubiquitous in space and may also stimulate new ideas about the mechanism of their formation.