Christopher Anvil wrote some science fiction short stories that featured a machine called an "asterator". It was supposed to make highly efficient, easy-to-control, safe nuclear power. It worked, but the effect turned out to be impossible to control...
This text is from the story "Doc's Legacy" which can be found in Prescription for Chaos, a collection of Christopher Anvil stories published by Baen Books:
"The asterator has a number of reaction chambers. Each chamber emits a narrow beam. Just as glass is transparent to light, ordinary matter is transparent to the asterator beam. The beams can focus on a common target. In a target containing unstable nuclei, the nuclei decompose."
"The significance of this--?"
"Nuclear weapons and reactors contain a lot of unstable nuclei. If an asterator focuses on them, the weapon or reactor blows up."
Allen nodded. "And the political effect?"
"Not long ago, the major powers had arsenals of nuclear weapons. Then Doc Griswell invented the asterator. Suddenly a nuclear weapon was more dangerous to its possessor than to anyone else. The result was rapid voluntary nuclear disarmament, which is still going on."
The asterator effect travels in a straight line, not attenuated by matter; it could literally travel through the Earth and explode a nuclear warhead or a nuclear fission power plant on the other side of the globe. Once this was discovered, every government realized that nuclear warheads and nuclear fission plants were now too dangerous.
Thus a device intended to make nuclear power safe made it so blackly dangerous that nobody dares to use it.
P.S. I also remember reading some kind of science fiction story where there was some sort of super-powered person who would personally travel around the world destroying nuclear weapons. After a short time, countries began using spies to identify any hidden caches of weapons in other countries, and would send information to this super-powered person so that he/she could destroy the weapons. Thus the only countries that had nukes were countries that had them hidden so well that spies couldn't figure out where they were, and after a while that meant no country had any nukes. I dimly remember that in the book this was called something like "the war of spies" or something like that, but that's all I remember. Hmm, maybe I should ask for a story identification on the science fiction StackExchange.