The electronic and geometric structures of carbyne on various transition metal surfaces were investigated by theoretical calculations. It was found that carbyne on non-active metal surfaces has a polyynic structure, while a polycumulenic structure is more stable on active catalyst surfaces. The self-assembly of carbyne on a metal substrate could lead to the synthesis of graphyne.