Duchess Goldblatt, to her uninformed and most disloyal subjects, is an 81-year-old purveyor of infinite wisdom delivered in pithy koans, “a world-class sexpot and cultural icon,” mother of Hacienda (the daughter serving a life sentence in a Mexican prison for unspecified crimes against humanity) and best-selling author of “An Axe to Grind,” “Feasting on the Carcasses of My Enemies: A Love Story” and “Not If I Kill You First,” a “heartwarming meditation on mothers and daughters.” She is also wholly fictional.

She resembles Frans Hals’s 1633 “Portrait of an Elderly Lady” and claims to be a resident of Crooked Path, N.Y., (“located 10 minutes outside of Manhattan and 10 minutes south of the Canadian border”) but, because she was born of an anonymous writer’s imagination eight years ago, lives largely in the Twittersphere.

Now, she has inspired a book, “Becoming Duchess Goldblatt,” the true memoir of an anonymous writer inventing a fictional character on Twitter who takes on a life of her own while transforming the life of the writer. It is a tonic, a gift for our anxious summer.

Duchess — she doesn’t fancy “the” — is given to the surreal wit perfected by comedian Steven Wright. “Becoming” is salted throughout with her dry aperçus: “New Year’s Eve, steam the new year in a pot of water with a bay leaf. Any months that don’t open on their own are no good. Throw them out.”

“Becoming” is many things, all of them splendid. It is a work of fiction, because Duchess is. (Or, maybe not, depending on the beliefs of her more than 35,000 followers.) It is also the story of an unnamed writer drowning in a well of grief and despair: a busted marriage, a dying father, a profoundly troubled brother and — just hanging there like a decade’s worth of therapy and Lexapro — “My mother hated me.”

“Becoming” is also the best sort of self-help, demonstrating that creativity, generosity and even Twitter, when not harnessed for the dark arts, can offer salvation and lift all boats, including those stuck on the ocean floor. Through her moonlighting as Duchess, the author becomes more productive at her day job as a “nonfiction writer.” She gets better at life. She tells a friend, “I think somehow Duchess is making me smarter.”

For good measure, the book is a love story, a requited one between fan and muse, delivering a hero from Texas with architecturally stupendous hair: Lyle Lovett.

Anonymous loves Lovett. Lovett in turn falls for Duchess, artistically not romantically. (Who doesn’t? Her subjects include master grammarian Benjamin Dreyer and novelists Rebecca Makkai and Elizabeth McCracken.) Writer and Lovett meet, inspire each other. Lovett informs the writer, “The world needs this story of how you’re using your talents as a force for good. It’s that universal love you foster. That universal acceptance you’re offering people, the community you’re creating . . . You’re like Jesus that way.” The singer’s chuckling but also serious. When Lovett encourages her to write a book, she writes this book.

Anonymity liberates the author to share her story without restraint. The book is enriched by two distinct voices: one frank and vulnerable, the other all-knowing. You believe the details of the author’s life because, through Duchess, she’s committed to staying generous and true. Duchess adores her subjects, answering every request, sharing their Duchess-inspired art and celebrating their mutual affection. It’s a Twitter circle of love.

Briefly, the author considers revealing her identity. Perish the thought! Duchess’s subjects are devoted to the pedestal, the Hals’s image. If revealed, the larger-than-life persona would become just more life.

“Some of the people who follow Duchess really need her to be their imaginary friend. If they find out who it is, the magic will be gone,” the author writes. “They want the fun of her remaining a pure living fiction.”

This sort of anonymity, in a time of too much oversharing on too many platforms, is a respite. We need magic. The book’s timing is inspired. It’s a summer cocktail of a book. Of Duchess Goldblatt, we would expect nothing less.

“Writing isn’t hard,” Duchess notes. “Worming my way into your heart one step at a time is hard. But it’s holy work, and I bought a boat with the overtime.”

Karen Heller is a Washington Post staff writer.

Becoming Duchess Goldblatt: A memoir

By Anonymous

Houghton Mifflin Harcourt. 240 pp. $24.