In William Forstchen's new science fiction novel, "Pillar to the Sky," there are no evil cyborgs, alien invasions or time travel calamities. The threat to humanity is far more pedestrian: tightfisted bureaucrats who have slashed NASA's budget.

The novel is the first in a new series of "NASA-Inspired Works of Fiction," which grew out of a collaboration between the National Aeronautics and Space Administration and science fiction publisher Tor. The partnership pairs up novelists with NASA scientists and engineers, who help writers develop scientifically plausible story lines and spot-check manuscripts for technical errors.

The plot of Mr. Forstchen's novel hinges on a multibillion-dollar effort to build a 23,000-mile-high space elevator—a quest threatened by budget cuts and stingy congressmen. Forthcoming novels in the series will explore asteroid mining, wormholes and astrobiology.

Fact-based science fiction may sound like a contradiction, or a poor marketing strategy, in a literary genre that typically celebrates flights of fantasy. But Tor and NASA say both stand to gain. Novelists get access to cutting-edge research and experts in obscure fields. A NASA official says that shaping science fiction offers "an innovative way to reach out to the public to raise awareness of what the agency is doing."

NASA has been hosting novelists at its research facilities for multiday tours titled, "Science Fiction Meets Science Fact." At one mixer, in October 2012, some 20 sci-fi writers mingled with NASA experts at the Goddard Space Flight Center in Maryland. They toured the radar detector development lab, laser and electro-optics facility and cosmic ice laboratory. Novelists tried on white anticontamination suits and were sent home with fragments of the heat shields used to protect satellites.