Several years ago, the novelist Rachel Kushner followed an inmate at New Folsom Prison, in Sacramento, into his cell. A former Los Angeles police officer, he was serving a life sentence without the possibility of parole for working as a contract killer. Kushner, seeking to learn about the prison system, had come with a criminology professor and his students, but, as the group continued down the hall, she stayed behind, and the prisoner told her about his crimes—the ones he was in for and those which had never been found out. His complexion was ghoulishly youthful, undamaged by the sun: dirty cops don’t dare go on the yard. On the cell walls Kushner glimpsed pictures of Harley-Davidsons, relics of a former life. In the five minutes she was alone with him, she told me, “I just felt his person, like he went into my skin. You get a whiff of somebody’s essence, whether you wanted it or not, and that’s enough to write a whole character.”

The whiff she got was of a cleaning solution called Cell Block 64, mingled with cop cologne. From this, she wrote the character Doc, in a single entranced session of literary ventriloquism: “Doc had money on his books and used actual cologne and not Old Fucking Spice, either. Good cologne by an Italian name-brand designer he can never remember. But then he remembers: Cesare Paciotti. It always takes him a minute to retrieve that name.” Doc appears, a major-minor character, in Kushner’s third novel, “The Mars Room,” which comes out in May.

Kushner, who is forty-nine and lives in Los Angeles, thinks of herself as a “girl citizen,” asking questions, at large in the world. She uses the novel as a place to be flamboyant and funny, and to tell propulsive stories, but mainly as a capacious arena for thinking. In her work, Kushner draws on decades of American social life and European intellectual history, while remaining open to slinky aberrations—poemlike passages, monologues, lists, a slip into unadulterated fact. “The Mars Room,” for instance, contains excerpts from the Unabomber’s diaries. This takes swagger. Don DeLillo, a friend, is a tutelary figure. Like him, she is good at conjuring mayhem: a riot, a blackout, a bomb going off at the country club. Her reading taste runs to Marguerite Duras and Clarice Lispector—women who are brainy, sexy, complex, unmanageable. “These are proxies for her,” Kushner’s husband, Jason Smith, the chair of the M.F.A. program at ArtCenter College of Design, says. “That’s what Rachel’s into—Spinoza with lipstick.”

Butter keeps her slender, along with five-mile runs in Elysian Park, near her house. She says she used to consider it a great injustice that she was not born more beautiful, had to work angles. She is being greedy. “Her whole hookup is badass,” Theresa Martinez, a friend of hers who was paroled from prison in 2009, told me. “But you can’t nickname a person Badass.” (She calls her Stormy: a force blowing in.) Kushner has owned several motorcycles; she skis like a racer, attacking the fall line, and rides around town, wearing Rouge Coco lipstick, in a black-cherry 1964 Ford Galaxie. She wonders, Can one feel cathexis for a muscle car? For longer trips, she takes a beat-up 2000 Honda Accord, with a copy of Steinbeck’s journals and Duras’s “The Lover” tossed on the back seat.

When Kushner started visiting prisons, in 2014, she had written two well-regarded novels, one about Cuba in the fifties and the other about New York in the seventies. Studying incarceration was a way to address the contemporary, and to understand an obscure realm that outsiders rarely enter. “I wanted to have a life that would include people that the State of California has rendered invisible to others,” Kushner told me, the first time we met, at the Taix, a venerable French restaurant where she eats several times a week. (She doesn’t cook.) “The theatrical component of due process is over,” she said. “Where do they go?” Most of “The Mars Room” takes place inside a prison loosely based on the Central California Women’s Facility—also called Chowchilla, after a nearby almond-growing and -processing town. Chowchilla, which Kushner has visited dozens of times, is the largest women’s prison in the world.

Several weeks after our first meeting, Kushner drove the Honda to Chowchilla. It was raining heavily; new wiper blades slapped against the glass. Kushner, in sunglasses, peered ahead, a scarf tied at her neck. As the rain subsided, she started looking for the halo of orange light that marked the presence of the prison in dim fields. “For me, things sometimes circle around imagery,” she said. “It’s not necessarily visual, could be more poetic, but in this case it was visual.” The light was just a puff, an emanation you might fail to register, unless you knew that some three thousand women were locked up there.

“That’s it!” she cried, pointing at the sodium glow. A friend inside had told her that one night there was a power outage, and as she was being hustled from her work-exchange job to her cell block, for the lockdown procedure that accompanies any anomaly—brawling, fog, or suicide—she glimpsed the Milky Way. It was breathtaking. Stars: she had not seen them since she got caught, and, as she was serving two life sentences without the possibility of parole, she might not again.

Romy Hall, the central voice of “The Mars Room,” is a former dancer at a strip club on Market Street in San Francisco. She is serving two life sentences, plus an additional six years, for attacking and killing a regular who began shadowing her on his Harley, turning up at her local market and, when she moved to Los Angeles to get away from him, on her front porch. The night she encountered him there, her young son, Jackson, was asleep in her arms; the extra six years on her sentence were for endangering a minor.

For years, Kushner wrote around Romy, unable to connect. “I came up against hardpan, where you can’t dig down,” she told me. “I would never go to prison for life, because I have these resources to protect me.” Then, as she began to write passages about her own adolescence and give them to Romy, a fusion started to occur. Kushner went on, “Romy’s from my neighborhood. Her friends are my friends. And a lot of her experiences I’m intimately familiar with.” The voice she found—pragmatic, syncopated, pained—is tempered by what her friend Bret Easton Ellis described to me as “thrilling neutrality.” “The ghost of my childhood lives in the back of buses,” Romy says, in “The Mars Room.” “It says, What’s up, juts its chin.”

Kushner’s parents—Pinky, a Southern redhead with a ski-jump nose, and Peter, the son of New York Communists—were scientists, integration activists, Beats. Pinky said she wanted her daughter to be a poet and her son to be a painter. (Kushner’s brother, dismayingly, chose medicine.) When Rachel was little, and her parents were graduate students at the University of Oregon, they lived on and off in a school bus heated by a wood-burning stove, and survived on six hundred dollars a month, augmented by food stamps. In the winter, the bus was sometimes parked at ski mountains: one year in Bend, Oregon, and another in British Columbia. The family hiked up and skied above the lift line, the sandwiches in their pockets fogging the cellophane.