An electrochemical synthesis of various nitroso organic compounds (NOCs) from secondary amines was developed under metal-free and oxidant-free conditions. This method used commercially available nitromethane as the nitrosation reagent to provide various NOCs in good to excellent yields. Furthermore, the valuable drug molecule form desloratadine can be prepared by this method easily.