The correct, original Murphy's Law reads: “If there are two or more ways to do something, and one of those ways can result in a catastrophe, then someone will do it.” This is a principle of defensive design, cited here because it is usually given in mutant forms less descriptive of the challenges of design for lusers. For example, you don't make a two-pin plug symmetrical and then label it “THIS WAY UP”; if it matters which way it is plugged in, then you make the design asymmetrical (see also the anecdote under magic smoke).
Edward A. Murphy, Jr. was one of McDonnell-Douglas's test engineers on the rocket-sled experiments that were done by the U.S. Air Force in 1949 to test human acceleration tolerances (USAF project MX981). One experiment involved a set of 16 accelerometers mounted to different parts of the subject's body. There were two ways each sensor could be glued to its mount, and somebody methodically installed all 16 in a replacement set the wrong way around. Murphy then made the original form of his pronouncement, which the test subject (Major John Paul Stapp) mis-quoted (apparently in the more general form “Whatever can go wrong, will go wrong)” at a news conference a few days later.
Within months ‘Murphy's Law’ had spread to various technical cultures connected to aerospace engineering. Before too many years had gone by variants had passed into the popular imagination, changing as they went. Most of these are variants on “Anything that can go wrong, will”; this is more correctly referred to as Finagle's Law. The memetic drift apparent in these mutants clearly demonstrates Murphy's Law acting on itself!