Azo compounds with high density, high enthalpy, and excellent detonation performance have received increasing research attention. The traditional method of chemical dehydrogenation combined to form azo compounds involves the use of strong oxidants, resulting in environmental pollution. Electrochemical organic synthesis is considered an old method and a new technology. In this work, azofurazan tetrazole (H2AzFT) and azofurazan hydroxyl tetrazole (H2AzFTO) were synthesized by the green and efficient electrochemical dehydrogenation coupling of 5-(4-aminofurazan-3-yl)-1H-tetrazole and 5-(4-aminofurazan-3-yl)-1-hydroxytetrazole, respectively. The structures of H2AzFT and (NH4)2AzFTO were fully characterized by infrared spectroscopy, nuclear magnetic resonance and elemental analysis, and their thermal stability was determined by differential thermal analysis.