Writing the Future: Basquiat and the Hip-Hop Generation,” a brilliant exhibition at Boston’s Museum of Fine Arts, reveals the centrality of visual art to hip-hop’s thrilling beginnings. The show prompts fresh consideration of the origins of hip-hop and the “post-graffiti” movement, which saw the street artists who had transformed New York’s urban landscape adapt their work for display in high-end galleries, as well as in music videos and fashion.

The show presents a primer, too, on the links between hip-hop and Afrofuturism, the aesthetic philosophy that combines cultural features of the African diaspora with futuristic technology. Afrofuturism was around well before hip-hop, but it hit the big time with the 2018 Marvel movie, “Black Panther.”

Hip-hop culture was dismissed by the mainstream as a passing fad when it emerged in the 1970s. In 2020, no one paying attention would argue with the proposition that hip-hop and rap are the chosen arena for droves of America’s most ambitious creative artists. “Writing the Future” reminds us that some of the original creative energy took visual form.

It focuses not only on Jean-Michel Basquiat, the best known of the visual artists, but a dozen of his peers, friends and collaborators, including Lady Pink, Keith Haring, A-One, Fab 5 Freddy and the remarkable Rammellzee.

It’s a provocative, super fun exhibition. To get to the museum’s underground space, you descend a wide staircase to a vestibule that has been transformed into a slightly too sterile New York subway station, replete with a life-size reproduction of the artfully spray-painted sides of subway carriages.

More gritty, glamorous and full-throated is the gallery designed like a dance party at the heart of the show. It features snippets from early films about hip-hop culture, including 1982’s “Wild Style,” directed by Charlie Ahearn, as well as videos by Madonna and Blondie (Debbie Harry). The video for Blondie’s hit single “Rapture” was the first rap music video aired on MTV in 1981; it featured Basquiat as a DJ and Lee Quiñones and Fab 5 painting bubble-letter murals.

The show’s final rooms, which plunge us into the visionary mutterings, masterly drawing and Afrofuturistic costume fantasias of Rammellzee — in many ways the true star of the show — are mind-altering.

Fans of Basquiat should love the exhibition. The Brooklyn-born son of a Haitian father and a mother of Puerto Rican descent took New York’s art world by storm in the 1980s before dying of a heroin overdose at the age of 27. But “Writing the Future,” which was organized by Liz Munsell and Greg Tate, is not really a Basquiat show. There aren’t very many works by him, and only a handful show him in top form.

Yet there’s more to this exhibition than putting Basquiat in context. It’s about a bigger phenomenon — a struggle for visibility that spilled over into hyper-visibility. It addresses a key period in Black creativity and urban youth culture, an extended moment too little understood by a mainstream culture that consigns it to the margins even as it swims in the very conditions it created.

So much about the show is unsettled or unresolved, which accounts for its liveliness. And of course, it continues to be contentious. But whether you see the explosion of graffiti on New York’s subway cars in the 1970s as an expression of creative exuberance and resistance to oppression or guerrilla vandalism (or both), the show will make you curious about graffiti, its move into high-end galleries (only a partial success) and hip-hop’s takeover of the cultural mainstream (a thoroughgoing rout).

There’s plenty of visual talent on display, including arresting things by Lady Pink (Sandra Fabara), who collaborated on spray paintings with conceptual artist Jenny Holzer, and Kool Koor (Charles William Hargrove Jr.). But, while the show convincingly presents post-graffiti as a considerable cultural phenomenon, it struggles to make the case that it is an overlooked arena of artistic excellence.

Basquiat and Rammellzee represent the show’s twin poles and its twined sources of energy.

When Jay-Z, in “Picasso, Baby,” rapped “I’m the new Jean-Michel, surrounded by Warhols,” he was referring, of course, to Basquiat. He was laying claim to a lineage that encompassed not only creative innovation but the kind of swagger and pomp that propels you from the disenfranchised streets into the center of mass popularity and cultural prestige.

Basquiat never “bombed” subway cars. But he gained early notoriety as part of SAMO, a duo (the other half was Al Diaz) who left epigrammatic tags on the streets of Manhattan’s Lower East Side between 1977 and 1980.

“Writing” was only one of the influences Basquiat harnessed, as Tate makes clear in his characteristically wonderful catalogue essay. Jazz, boxing, Brooklyn’s built environment, the West Indian Day Parades Basquiat saw with his Haitian father, and modern art, which he saw on visits to the Museum of Modern Art with his mother, were all part of the mix.

If Basquiat was a great synthesizer who “came in swinging for the museum collection,” as Tate puts it, Rammellzee was a visionary, profoundly suspicious of mainstream acceptance. He “gave graffiti writing theoretical gravitas.”

Rammellzee was from Queens. He spent his teens tagging trains in his Far Rockaway neighborhood. He developed a style of writing that extended the seraphs of letters into arrows or dynamic vectors resembling missiles, rendering them all but illegible, except to the initiated.

The futuristic, militaristic look, so integral to “Black Panther,” was just part of the zeitgeist for these graffiti artists. “We are generals in the urban army,” said Fab 5 at the opening of a post-graffiti show at the Sidney Janis Gallery in 1983. “Ambassadors of the word,” chimed in Rammellzee. Harking back to musicians Sun Ra and George Clinton, Afrofuturism appeared in the work of artists like John T. Biggers and in several of the post-graffiti artists in “Writing the Future,” including Basquiat, Futura, Keith Haring and Fab 5 Freddy.

Like Sun Ra, Rammellzee had an imagination that relished building alternative histories, alternative worlds. He saw his style of subway writing as a “calligraphic offshoot of the writing done by 16th-century Gothic monks,” explains Tate, who continues, hilariously:

“Few New Yorkers of the time would push back against the notion that the subway system of the 1970s was a sector of Hades but who knew it harbored the quantum voodoo of a long-dead Gothic sect awaiting reignition by an army of ingenious and feral urban teens armed with spray paint and ten-car trains for canvas? Who else but Rammellzee could have concocted a fabulous mythos and ethos out of that wildass conceit?”

The show’s mad masterpiece is a monumental, 12-panel drawing in felt pen and colored marker that stretches horizontally along most of a wall, like a Japanese scroll. Long ago divided by the artist into two parts, the work is reunited here for the first time since 1983. Graphically, its sophistication is immense, switching back and forth between flat typography and 3-D illusionism. The colors, too, are bewitching.

The wall label describes it as “a grandiose summary of graffiti’s history and future,” its lettering intended “as weapons in a war against authoritarian control of communications.”

If hip-hop culture — with its militant poetics of disruption — emerged out of racism, disenfranchisement and cultural exclusion, what fate would it enjoy when it became the toast not just of the town but of young people around the world?

The career and posthumous reception of Basquiat provides one answer. Rammellzee, meanwhile, believed graffiti writing lost its soul when it moved into galleries, and when its artists stopped trying to establish their own criteria of mastery and instead fell under the influence of “outside” criteria: “We failed what could have been ‘our’ culture,” he said.

The point is moot from the perspective of today. You can’t draw walls around genuinely creative energy, nor can you take possession of criteria and keep them exclusively to yourself in the way Rammellzee implies.

But you can wonder, with him, whether the art produced by the post-graffiti artists lost something when it was transferred to canvases and placed in fancy galleries. Persistent racism might be one explanation for why so little of this work has enjoyed the same success as Basquiat’s. But it might also have to do with the preferred medium — spray paint, which has its fascinations, but none of oil paint’s rich textural possibilities or translucency and which tends to die on the eye — and the relative dearth of singular artists operating over sustained periods at the highest levels of ambition.