
Riker being shocked by an Ornaran
Electrocution was death as a result of contact with electricity. Some cultures used deliberate electrocution as a form of punishment for criminals.
Earth, while exercising the death penalty, utilized the electric chair as a means of electrocuting criminals. (ENT: "Detained") Deneb IV's death penalty offered the guilty party a choice of death sentence which included death by electrocution. (TOS: "I, Mudd")
In 2151, Jonathan Archer told the Ferengi Krem that it is not that easy to yank out an antimatter injector like a light bulb. He would be electrocuted. (ENT: "Acquisition")
In 2152, Trip Tucker told Zoumas aboard an Enolian prison transport that the power flowing through the plasma conduits could have electrocuted him. (ENT: "Canamar")
In 2267, Spock received an electric shock from the Companion. (TOS: "Metamorphosis")
In 2268, after being shocked by the Fabrini Oracle, Leonard McCoy remained unconscious longer than James T. Kirk or Spock, prompting the Vulcan to speculate that he had "received an excessively large electrical shock." In reality, McCoy was more affected due to being weakened by Xenopolycythemia. (TOS: "For the World is Hollow and I Have Touched the Sky")
In 2270, Captain James T. Kirk survived an electric charge from the Capellan power-cat in Kukulkan's zoo. (TAS: "How Sharper Than a Serpent's Tooth")
The two humanoid species known as Brekkians and Ornarans had the natural ability to release electrical charges which they used in combat to subdue their opponents. In 2364, an Ornaran subjected William T. Riker to electrocution, threatening to kill him. While being shocked, Riker was in a state of paralysis or stasis. (TNG: "Symbiosis")
Data was nearly electrocuted by the Calamarain when he tried to rescue a powerless Q in 2366. (TNG: "Deja Q")
In 2373, the Doctor examined a Borg corpse aboard USS Voyager. His observations included that the pulomnary system exhibits evidence of extensive alveolar damage, a slight swelling consistent with exposure to space, and signs of severe cardiac depolarization which led Kes to the conclusion that he was electrocuted. (VOY: "Unity")
The claws of the Watchers were capable of firing an energy bolt or delivering an electric shock. (PRO: "Lost and Found")
When the Artifact regained power, Narissa suggested to get rid off the Borg drones before they come out of stasis. She asked Tarent if the drones could be gassed or electrocuted but Tarent suggested to blew them out into space. (PIC: "Broken Pieces")