A decade after the attacks of Sept. 11, Ayad Akhtar staged a play called “Disgraced” that captured the paradox of being an American of Muslim descent. His one-act drama, which went on to win a Pulitzer Prize, takes place in the elegant Manhattan apartment of a Pakistani American lawyer named Amir Kapoor who’s married to a white artist. On the night we meet them, one of Amir’s colleagues drops by with her husband for dinner. Smart and sophisticated, they all talk about religion and politics, but the evening will eventually veer out of control and turn vicious — a kind of “Who’s Afraid of Osama bin Laden.” At a climactic moment, one of the guests asks Amir if he felt proud when planes smashed into the twin towers. Without hesitation, he answers, “If I’m honest, yes.”

When the other three characters blanch, Amir explains that he felt a sense of pride “that we were finally winning.”

“We?” his horrified colleague asks.

“Yeah . . . I guess I forgot . . . which we I was.”

The challenge of remembering one’s identity in a racist culture is also at the heart of Akhtar’s remarkable new book, “Homeland Elegies.” But here, Akhtar bounds far beyond the cleverly engineered drama of “Disgraced.” With its sprawling vision of contemporary America, “Homeland Elegies” is a phenomenal coalescence of memoir, fiction, history and cultural analysis. It would not surprise me if it wins him a second Pulitzer Prize.

But for which category?

In an introductory note to readers, Akhtar claims, “This is not a work of autobiography. . . . This is a novel.” That’s the only disingenuous passage in this book. The interior design of “Homeland Elegies” may include elements of fiction, but the architecture is clearly the author’s life: The narrator is a man named Ayad Akhtar, the son of Pakistani doctors, who writes a Pulitzer Prize-winning play about a Muslim American and then struggles to negotiate the rising xenophobia of the Trump era. Check, check, check, check.

My point isn’t to call out how closely the story echoes the author’s history. One of the most fascinating themes of this tour de force is the sustained tension between memoir and invention that runs through any creative person’s life. Akhtar introduces that subject early in a chapter called “On Autobiography; or, Bin Laden.” He notes that after his play made him famous, he was repeatedly asked to what extent the central character was him. “I’ve gleaned that what I’m usually being asked is whether I, too, felt a blush of pride on September 11.” His answer loops back to the creation of Pakistan, describes the radicalization of a family friend, explains the CIA’s role in Afghanistan, and then finally brings us to the moment his exasperated mother condemned American military aggression: “They deserve what they got,” she says — a line that eventually ended up in his famous play.

How, the narrator asks, can he “express the complex, often contradictory alchemy at work in translating experience into art?” This essayistic novel is Akhtar’s answer to that question. It’s a poetic confession of the agony of trying to articulate a nuanced critique of faith and politics in an age of shrieking partisanship.

The story’s sinuous plot moves through the lives of the playwright and his father, constantly assessing their respective attitudes toward the United States as their fortunes rise and fall. “Love for America and a firm belief in its supremacy,” Ayad says, “was creed in our home.” His father, a heart specialist who dabbled in real estate, once treated Donald Trump, and that brief encounter fueled his enthusiasm for the TV celebrity “well past the point that any rational nonwhite American (let alone sometime immigrant!) could possibly have justified to himself or anyone else.” Ayad sees in his father’s unlikely attraction to Trump something essential about contemporary America. It demonstrates, he says, “the full extent of the terrifying lust for unreality that has engulfed us all.”

But this is not merely a critique of the MAGA crowd. Something more virulent, he suggests, is infecting modern civilization. In 2008, years before the ascension of the Very Stable Genius, Ayad travels to Pakistan with his father to visit their relatives. In their “infuriating stupidity,” he sees “the broad outlines of the same dilemmas that would lead America into the era of Trump: seething anger; open hostility to strangers and those with views opposing one’s own; a contempt for news delivered by allegedly reputable sources; an embrace of reactionary moral posturing; civic and governmental corruption that no longer needed hiding.” We’re living, Ayad warns, through a systemic collapse of confidence fueled by “thoughtless and obsessive suspicion.”

All this could sound insufferably superior if the author weren’t so willing to make himself squirm under his own examination. Akhtar’s portrait of the artist as a young Muslim exposes both his vanity and his capacity for obsequiousness, particularly around wealthy people. As in “Junk,” Akhtar’s most recent play, “Homeland Elegies” attends closely to the distorting power of money and debt in modern society. A significant section of the book traces his compromising relationship with a Muslim hedge fund manager who lures Ayad into high society and gives him a lesson in predatory capitalism.

Everywhere one can hear Akhtar’s award-winning ear for dialogue that conveys the unexpected rhythms of conversation and drama. But what’s surprising is his equally engaging mode as a lecturer. Personal episodes mingle effectively with engaging disquisitions on, say, the dilution of antitrust law, the financialization of modern medicine and other arcane economic issues that rarely intrude so forcefully in the pages of literary fiction.

This blended approach works only because the book demonstrates the ills warping both East and West with stories rooted in the author’s own experience, bravely diagnosing what it means to struggle, humiliatingly, for acceptance in a racist country. The defining dilemma of his life, Ayad says, is that he’s “no longer a practicing — let alone believing — Muslim and yet still entirely shaped by the Islam that had socially defined [him] since 9/11.”

In one of the book’s many memorable set pieces, Ayad’s car breaks down while driving through Pennsylvania. His encounter with a state trooper and later a repair shop demonstrates what it means to be a potential terror suspect; to always be on one’s friendliest behavior; to shift, whenever possible, one’s lineage to India. “If all this sounds somewhat paranoid,” Ayad writes, “I am happy for you. Clearly you have not been beset by daily worries of being perceived — and therefore treated — as a foe of the republic rather than a member of it.”

After years of trying to imagine he’s welcome here, he finally forces himself “to stop pretending that I felt like an American.” Ironically, by embracing that conflicted position, Ayad attains the success that is the American Dream. To mainstream white culture, he’s a Muslim willing to say what needs to be said; to some Muslims, he’s a self-loathing sellout who cashes in on ethnic stereotypes. That paradox runs like a wire through this book, which so poignantly expresses the loneliness of pining for one’s own homeland.

Ron Charles writes about books for The Washington Post and hosts TotallyHipVideoBookReview.com.

Homeland Elegies

By Ayad Akhtar

Little, Brown. 346 pp. $28