Shortly after the end of the American Civil War, munitions producer Victor Barbicane announces that he has invented a new explosive, "Power X", which he claims is much more powerful than any previously devised. Metallurgist Stuyvesant Nicholl scoffs at Barbicane's claims and offers a wager of $100,000 ($2.3 million today) that it cannot destroy his invention, the hardest metal in existence. Barbicane stages a demonstration using a puny cannon and demolishes Nicholl's material (and a portion of the countryside).
President Ulysses S. Grant requests that Barbicane cease development of his invention after several nervous countries warn that continuing work on Power X could be considered an act of war. Barbicane agrees, but when he discovers that pieces of Nicholl's metal retrieved from the demonstration have somehow been converted into an extremely strong yet lightweight ceramic, he cannot resist the chance to construct a spaceship to travel to the Moon. He recruits Nicholl to help build the ship. Meanwhile, Nicholl's daughter Virginia and Barbicane's assistant Ben Sharpe are attracted to each other.
After completing the spaceship, Barbicane, Nicholl, and Sharpe board it and, amid much fanfare, take off. Once they are in outer space, the strongly religious Nicholl reveals that he has sabotaged the vessel, believing that Barbicane has flouted God's laws. When it is discovered that Virginia has stowed away, Nicholl cooperates with Barbicane in a desperate attempt to save her. Sharpe is knocked out, and he and Virginia are placed in the safest compartment of the ship. Barbicane and Nicholl then fire rockets that send the young couple on their way back to Earth, while the two scientists land on the Moon in another section, with no way off. They are able to signal to the young couple that they have reached the Moon safely.