For some African-American writers, New York’s uptown neighborhood of Harlem represents both a crucible and a showcase. Writing about Harlem has been known to launch literary careers, for those good enough to capture something of the vibrancy and rich history, the majesty and appalling poverty, the sounds, smells and feel of the place—its growth in the early 20th century into the capital of Black America, with the nation’s largest concentration of African-Americans; the birth, in the 1920s, of the Harlem Renaissance, an explosive movement of literature, art and music; the continued tough economic times and resulting crime; the quiet majority of citizens who work hard in the daytime and return to their families in the evening. But how to evoke, in the words of Ann Petry, this “hodgepodge of churches, bars, beauty parlors [and] harsh orange-red neon signs,” this lush urban world “as varied and as full of ambivalences as Manhattan itself”? Many writers have taken up the challenge. The Jamaican-born Claude McKay published the novel “Home to Harlem” in 1928, and the action in Nella Larsen’s 1929 classic “Passing” takes place in Harlem. Ralph Ellison set part of his groundbreaking 1952 novel “Invisible Man” there; Chester Himes chose the neighborhood as the backdrop for a series of slim, zany, biting, frequently hilarious crime novels featuring the detectives Grave Digger Jones and Coffin Ed Johnson, among them “Cotton Comes to Harlem” (1965). Unlike all of those writers, James Baldwin grew up in Harlem and—for all the time he spent abroad—in some ways never left, writing about his birthplace in essays such as the immortal “Notes of a Native Son” and in fiction including his first novel, “Go Tell It on the Mountain” (1953). Works by contemporary writers include Sharifa Rhodes-Pitts’s 2011 nonfiction book “Harlem Is Nowhere,” whose title is taken from an Ellison essay. And now comes Colson Whitehead’s new novel, “Harlem Shuffle.”

The book might be called “Colson Comes to Harlem,” because in bringing his singular gifts to this storied place, the novelist turns to the crime genre. He does so at an interesting point in his career. Mr. Whitehead, born in New York in 1969, built a reputation with the novels “The Intuitionist” (1999) and “John Henry Days” (2001), works that centered on black characters but put neither character development nor blackness at center stage. Mr. Whitehead’s fascination lay instead with arcane subjects (elevators in the case of “The Intuitionist”), philosophical concerns (the unknowability of people and truth in “John Henry Days”) and, perhaps most of all, language, which he used like a warlock, casting spells over readers with wildly inventive and startlingly funny descriptions. Race came closer to the fore in “Apex Hides the Hurt” (2006), receded a bit in “Sag Harbor” (2009) and “Zone One” (2011), then returned, more forcefully than ever, with “The Underground Railroad” (2016) and “The Nickel Boys” (2019). With those last two novels, a somewhat older Mr. Whitehead played down the smart-guy language, and in its place came something new: emotional resonance. The literary community took notice, bestowing the Pulitzer Prize on both books and the National Book Award on “The Underground Railroad.” In his eminently enjoyable new novel, Mr. Whitehead’s various powers have attained something like equilibrium. The humor and flashes of the old word-wizardry are there, as is the philosophical subtext; race, while not foregrounded the way it is in “The Underground Railroad” and “The Nickel Boys,” is woven inextricably into the background, like subtle but effective film music; and we are made to care about, and root for, the main character.

Ray Carney is the hero of the novel’s three parts, set, respectively, in 1959, 1961 and 1964, points in time that together reveal gradual changes in Harlem, in New York City, and in the protagonist himself. Carney, the owner of a furniture store on 125th Street—Harlem’s main drag—is 30ish when we meet him, happily married with a young child and another on the way. Logically speaking, Carney should not have turned out so well; his mother died when he was young, and his father, a petty criminal, disappeared from time to time, leaving Carney mostly to raise himself. He did a creditable job, working to put himself through Queens College. His father did do one thing for him, if not on purpose: After the elder Carney was shot to death by police, Carney found, hidden in the old man’s pickup truck, tens of thousands of dollars that he used to set up his store. (While many would be impressed by Carney’s mainly up-by-the-bootstraps story, his snooty, status-conscious in-laws have other opinions.)

In telling Carney’s story, Mr. Whitehead comes off a bit like the onetime class clown who has matured enough to realize that jokes will not carry him through every situation, even as he is sometimes unable to resist making them. So the novelist who tells us about one character’s “chasing criminal renown the way musicians pursued Carnegie Hall: practice, practice, practice” can also tell us about his main character, “He had the store then, paint still fresh; no one thought he’d make a go of it except [his wife]. At the end of the day when she propped him up and told him he could do it, he puzzled over these alien things she offered him. Kindness and faith, he didn’t know which box to put them in.”

Like Baldwin, Carney leaves the circumstances of his past behind, only to find that they live in him. In his lean early days as a store owner, he keeps himself and his family afloat by taking a more or less passive part in the crookedness that makes the world of Harlem go ’round—in Carney’s case, by not asking too many questions about the “gently used” furniture and other preowned items that come his way. Many of them come via his cousin and close friend, Freddie. When they were boys, Freddie would often rope Carney into scrapes, always sincerely apologetic when both were about to be punished yet unable to stay out of trouble for very long afterward. That relationship dynamic carries over into adulthood, when the dangers go well beyond spankings, and the plots of “Harlem Shuffle” mostly turn on situations that Carney fully grasps at the same time he realizes he is smack in the middle of them. That is not always the case, though. In the book’s second section, someone does Carney wrong, and the furniture salesman discovers that his father’s vengeful streak has been passed down.

In all of these adventures, Carney has an unlikely, accidental ally, one of the most vivid characters of Mr. Whitehead’s career: an old associate of Carney’s father who goes by the name of Pepper. The magic trick Mr. Whitehead pulls off is to make the reader like this strong, silent misanthrope, though part of the trick, surely, is Pepper’s way of coming to the rescue, even if not for the most selfless of reasons. Pepper is “burly and long-limbed, stooping to hide his true size,” a “mountain man who’d taken a wrong turn and stayed in the city . . . a foreign body that had adapted to its new home.” If Carney’s nice family and legitimate business are an outward manifestation of one side of his nature, then the other side takes the form of Pepper.

That brings us to the book’s philosophical subtext, which has something in common with that of “John Henry Days.” Whereas that novel was a reflection on how little we know of the events and people around us, “Harlem Shuffle” concerns our stubborn refusal to know ourselves. Carney prefers, at least for much of the book, to think of his true self as an ever-so-slightly off-color version of the shining image he projects to others: the young man raised in hard circumstances who managed to go straight, the family man who helps supply other young families with that most foundational aspect of their shared lives—the furniture on which they rely for comfort in their precious hours at home. The not-strictly-legal activities help with the rest, that’s all. Carney’s mind is a company whose well-staffed justification department works overtime. “Everyone had secret corners and alleys that no one else saw,” the close-third-person narrator tells us, but “what mattered were your major streets and boulevards, the stuff that showed up on other people’s maps of you.” Left unsaid is that the likeable Carney is a stand-in for the rest of us, we who adjust our view of ourselves to make it through the day. This becomes doubly difficult when those selves have to adjust to changing circumstances.

Such change is part of the backdrop of “Harlem Shuffle,” too, as the passing years bring new developments: Cold War fears; protest and its rowdy twin, rioting; the heroin epidemic; and the shifting, growing physical landscape of New York. Walking through downtown toward the end of the novel, Carney sees the beginnings of what will be the World Trade Center, which inevitably—and no doubt purposely—leads the reader’s thoughts to 9/11 and others of New York’s shared disasters, a list that would include the current era.

Some of the slowly gathering change involves Harlem’s essential character. In 1925, James Weldon Johnson asked, “Are the Negroes going to be able to hold Harlem?” When they do leave “this choice bit of Manhattan Island,” he answered—“their homes, their churches, their investments and their businesses”—it will be “because the land has become so valuable they can no longer afford to live on it.” About three years ago, one middle-aged African-American writer dined with two acquaintances in a nice restaurant at 126th Street and Malcolm X Boulevard in Harlem. Looking around at one point, the writer realized that he and his companions were the only black people in the place.