An electrochemical procedure has been developed for halofunctionalization of olefins, which allows for introduction of both nitrogen and oxygen containing substituents. The method obviates the need for silver salts or chemical oxidants, presently employed in analogous chemical routes. Thus 1-phenyl-2-butene on electrolysis in acetonitrile solution containing Et4NI, Et4NBr, or Et4NCl was converted to the corresponding haloamide derivative. In a related study, which extends the scope of electrochemical functionalization by nitrogen to negatively substituted olefins, dimorpholinization of trans-dibenzoylethylene was carried out by anodic oxidation of an acetonitrile solution of the olefin in presence of morpholine and Et4NI.