While the U.S. was the first to land a man on the moon, in the late 1950s, it was losing the space race. You remember: the U.S.S.R. put the first satellite into orbit (Sputnik 1) and successfully completed the first manned space flight (Yuri Gagarin).
The U.S. needed a boost. It needed something to show it could compete in the space race. It needed -- to blow up the moon, it was reported on Monday.
In reality, that's hyperbolic. The U.S. couldn't blow up the moon. It couldn't even propel a hydrogen bomb to the moon. It was too heavy, so the best the U.S. could do was send an atomic bomb to the moon. The secret project was alternatively called “A Study of Lunar Research Flights" or “Project A119” but -- as you probably know -- was never carried out.
It's unclear why the plan was scrapped, but there are a number of possible reasons. For one, while scientists were sure the sight of a nuclear flash on the surface of the moon would surely frighten the Soviets, it might not have the desired effect on the West (hope), but instead inspire fear, as well.
In addition, scientists were unsure exactly what -- if any -- effects the bomb's explosion would have on Earth. While this is the sort of thing always done in science fiction movies, usually with a disastrous result, this was real life.
Finally, NASA didn’t want to jeopardize any future landing missions to the moon with radioactive fallout.