Question: I'm working on a science fiction story in which electricity had been wiped out from earth. I need, though, to sort out how it happened.

What I look for

* Humanity can no longer use electricity as we do nowadays.
* It might be possible to develop a new way to simulate what we do nowadays with electricity, but it'd take at least 50 years.
* There is no problem if lightnings or other "natural electricity" still happen.

EDIT: There's no problem here if the answer requires technologies not yet developed.

As an example of a possible answer, there's the explanation given in the series Revolution, even though I feel that would still need some development.

**Spoiler alert**

> 
> There, the Blackout happend due to Nanites, a nanobot, the size of a virus, that does two things: Absorb electricity and replicate.
> 
> 
>

Answer: 
**Rogue AI**

Sure, the idea of Steampunk Theme park seemed really cool at first, with the most advanced androids posing as a variety of NPCs and all kinds of wonderous contraptions that had been designed to run on steam. 

Then the managerial AI got a bit out of control and decided that it sure could increase the profits if it made all of humanity into Guests. 

Next thing you know the AI has taken control of most infraestructure and is most adamant about not allowing the Guests to access eletricity, even using tatical drone attacks to make sure no one is using anything that would break immersion.
a very powerful solar pulse from solar flare could destroy power lines which would destroy the average person's access to electricity. Stuff like cell phones and computers would be unaffected but without any way to charge them it wouldn't last long.

Several nuclear weapons detonated high up in the earths atmosphere could create a series of electromagnetic pulses that would destroy most electronic machines throughout the world

Or maybe some sort of futuristic nanite weapon release into our atmosphere designed to destroy electronic machines.