Julianna Baggott had no reason to expect it would take 18 years to write her 21st book, Harriet Wolf’s Seventh Book of Wonders, an ambitious historical novel spanning the 20th century and three generations.

After all, she’s a prolific writer whose fiction includes bestsellers Girl Talk and The Miss America Family; Pure, a 2012 New York Times Notable Book, part of her young adult trilogy; seven novels for middle grade readers under the pen name N.E. Bode, four novels for a “commercial” market under Bridget Asher; and three books of poetry.

Baggott, who generally has two or three projects going at once, was working out what shape this historical novel might take when reviews for The Madam, a novel based on her great-grandmother who ran a bordello, came out. After the critical success of her first two books, she says, the tepid reception “knocked me off my game.” One line describing the book as “a rather standard kitchen-sink drama” hit her hard. “I felt like I’d given voices to the women in the novel and then they were dismissed. I felt guilty about setting them up.”

It’s hard to imagine anything stopping the self-described hyperactive author whose brain is on “full whir” from the minute she wakes up each day. “I realized early on that it’s easier to let my horses just run and gallop than to rein them in.”

And gallop she must with four children, ranging in age from 8 to 20, and teaching jobs at the College of the Holy Cross in Massachusetts and at Florida State University. Add writing to the mix and you’ve got a full, hectic life. Her husband and creative/business partner David Scott helps her keep it altogether.

So when the review shut down her impulse to write a “big artistic book,” she kept going in other genres. Not that the Harriet project ever went away altogether.

“I’ve never written a novel that has gone through so many profoundly different drafts,” she writes in the book’s acknowledgments. A few drafts were published as short stories, but none had the substance to sustain a long narrative. “There are some aspects of a novel you can’t explain,” she says. “Unlocking a voice is one of them. If you find the right voices, they’ll start telling you the story and make decisions for you.”

It turns out she found four distinct voices that give the narrative remarkable depth and scope: the strange elusive Harriet, author of six popular books in a beloved series; her agoraphobic daughter Eleanor, who sees the world as a dangerous place; and Eleanor’s daughters, Ruth, who flees her mother’s obsessions, leaving her sister behind, and Tilton, who, isolated by her mother’s over-protectiveness, lives in a poetic, whimsical world of her own.

The question of whether or not a seventh novel exists to be published posthumously vexes fans and family, but it’s the reclusive, secretive Harriet’s past life, her painful childhood, and lost love that haunt the story.

Baggott, who would rather be called a “collector of odd things” than an author, finds the concept of taking an idea and running with it foreign to the way she works. Her books evolve from impulses; some are obsessions from her own life that she delivers in a different context.

One event from her childhood, for example, was fixed in her mind. She was sitting in a Delaware diner with her parents when she noticed a newspaper clipping about a plane crash in their town with the headline: “Dead Fell From the Sky.” In the book, witnessing a plane crash is a catalytic event in the lives of Eleanor and her daughters.

Another key element in the novel came from a book about the Sheppard Pratt psychiatric hospital. An obscure footnote mentions the Maryland School for Feeble Minded Children (later named the Rosewood State Training School), which became the model for the orphanage where Harriet is placed as a “moron” until a kindly doctor discovers she’s really a genibaggott coverus.

Harriet’s plight is not that far from true stories of children left in orphanages because their parents couldn’t feed them during the Depression, or they were disfigured, disabled, or just strange.

When Baggott visited the dilapidated buildings that had housed the school, she found old records and photographs that would “break your heart.” The institution’s 1911 biannual report was “gold,” she says. It provided background about what life was like for the children and details of what was essentially the sanctioned child labor that Harriet describes in the novel: “The girls ‘sewed 848 dresses, 393 petticoats, 954 drawers, 222 men’s shirts, 235 boys’ shirtwaists, 496 bibs, 87 rubber sheets, 34 rubber pillow slips, 123 ham bags, and two awnings for the Duck Porch.’ ”

“We are the stories we tell and don’t tell,” says Baggott, whose grandmother told of being in and out of orphanages. She brings compassion, wit, and light to the novel as it encompasses mother-daughter dynamics, mythologies that change from generation to generation, secrets, transgressions, love, and forgiveness.

Elfrieda Abbe is the former editor of The Writer magazine and a freelance writer and book critic.