There are few gestures of mainstream embrace quite like an invitation to Buckingham Palace. In March, Prince William made Richard Kylea Cowie, better known as the rapper and producer Wiley, a Member of the Most Excellent Order of the British Empire (M.B.E.), for his contributions to the arts. This wasn’t a case of the fusty establishment pandering to a hot new hitmaker. Wiley, who is thirty-nine, has been releasing music since 1996, though he has topped the U.K. singles chart just once. In the early two-thousands, he helped pioneer the British musical subculture known as grime. Grime originated in East London, and was created by young people who were inspired by hip-hop’s cold swagger and the hyperactivity of dance music but were beholden to neither. Instead, they made music that sounded fresh and bizarre, as if they were tiptoeing through an alien invasion—a raucous collision of exasperated, rapid-fire raps, all-levelling bass lines, and twitchy video-game bleeps. This isn’t hyperbole; early grime beats were often made on gaming consoles.

After the ceremony, Wiley reflected on the unlikeliness of it all, recalling a time when he assumed that the royals “would never know us.” Grime, after all, had evolved in the shadows, a product of, and a response to, government neglect. At first, it lived primarily on pirate radio, that great British tradition in which people scale the tallest building they can find and hide makeshift transmitters. In the eighties and early nineties, new strains of dance music, like hardcore rave and jungle, evolved on such stations. In part, grime was a reaction to how posh the world of dance music had become by the late nineties. I first heard the genre on a forty-minute MP3 file, in which Wiley went back and forth with Dizzee Rascal, another early grime hero, at blistering speed. They didn’t conceal their accents—something that European rappers of the eighties and nineties often did. They didn’t even seem to be stopping for breath. I couldn’t tell whether they were rapping over beats or over windows being shattered, or even malfunctioning car horns.

In “Inner City Pressure: The Story of Grime,” the British journalist Dan Hancox describes the sound of those early days as having “crash-landed in the present with no past, and no future.” His book draws on more than a decade of interviews with many of grime’s most important lyricists, producers, d.j.s, and promoters. Hancox writes with a fan’s zeal, recounting the rush of hearing paradigm-shifting singles for the first time, and the pride of seeing underdogs like Wiley and Skepta ascend to superstardom. At first, there was little hope that these songs, which sounded like crude moments of catharsis, would ever travel beyond their neighborhoods. These were anthems for clubs that did not exist, with the hiss of ungrounded wires discernible in the background. “We were just having the best time ever,” Wiley told Hancox.

A turning point came in 2003, when Dizzee Rascal, who was nineteen years old, won the Mercury Prize, England’s most prestigious music award, for his début album, “Boy in da Corner.” Dizzee had a talent for cold, wobbly beats, and he rapped with a kind of prissy flamboyance. He represented a different kind of pop star, and his lyrics, which provided glimpses into a different way of life, proved shocking to many. (Two weeks before his album came out, he was stabbed six times, possibly by a rival hip-hop crew.)

As he and other grime artists vied for pop success, their music slowed down, rechannelling some of the raw furor it had started out with. By the late aughts, the mainstream view was that grime’s moment had passed. Hancox disagrees, pointing out how singles like Lethal Bizzle’s “Pow!” and Tempa T’s “Next Hype” lived on, as soundtracks for a movement protesting rising school tuition. Hancox’s book is distinguished by his background in urbanism and politics. His previous book was about Marinaleda, a utopian-sounding Spanish village where citizens live coöperatively, and he’s written extensively on anti-capitalist activism. Consequently, he situates grime, particularly the lean years after Dizzee, Wiley, and others became stars, within a larger story of rampant development and gentrification. The spaces that had produced grime had shrunk, and become more suffocating, thanks in part to London’s heavy investment in surveillance technologies. One of the legacies of the 2012 Olympics was the so-called rejuvenation of the East End, including Wiley and Dizzee’s old neighborhood, Bow. As grime artists were absorbed into the city’s cultural marketing plan—Dizzee recorded one of the official songs of the Games—the hooded sweatshirts and, in the parlance of London policing, the “antisocial behavior” of their young fans came under increased scrutiny.

When Wiley accepted his M.B.E., he tipped his hat to Stormzy, a younger London artist whose début album, “Gang Signs & Prayer,” won the 2018 Brit Award for British Album of the Year—a category dominated for decades by rock acts. Grime is no longer an expression of what Hancox terms “neighborhood nationalism.” Now those musicians speak to wider constituencies, as in the wake of the Grenfell Tower fire, when artists like Stormzy, AJ Tracey, and Novelist voiced the frustration shared by many toward England’s Conservative leadership. Last year, there was even #grime4corbyn, the occasionally awkward attempt by scene veterans like JME to encourage young people to support Jeremy Corbyn, the Labour Party’s candidate for Prime Minister.

Still, the instinct toward street-corner tribalism runs deep. Now turf is claimed in other styles. In the past few years, the hysteria and the moral panic that once surrounded grime has drifted toward U.K. drill, which began around 2012 as a London-centric take on the dark, deadpan music coming out of Chicago. Where grime is verbose and cathartic, U.K. drill traffics in a cool heartlessness, a sense of menace that wafts and oozes. Authorities have been troubled by drill’s singular lyrical fixation on slashings and stabbings, and by episodes in which gang attacks were prompted, if not prophesied, by songs. U.K. drill is unusually grim, suffused with a nihilism that expects little of tomorrow.

In June, a court order was issued prohibiting the London group 1011 from mentioning violence or certain postal codes in their lyrics. The relationship between real life and art is a messy one, and it’s always easier to regulate the latter. It’s much harder to disentangle the out-of-control kids from the world they’ve grown up in, to determine whether music is a salve for misery or a spur to it.

The Pittsburgh rapper Mac Miller, who died in early September, often spoke of the difficulty of living up to his fun-loving, try-everything persona. In the course of his career, he grew increasingly vexed by the reality he had made for himself. When he first emerged, as a teen-ager, he was often dismissed as a novelty, a goofy white kid making tunes for all-night frat parties. He smiled while he rapped, a trait that initially seemed suspect, as though he were getting away with something. But, as his career evolved, that smile came to express a kind of awe, a sense of wonder at what he’d become as an artist. Miller began to use his scratchy, cocksure voice differently, his raps growing more singsong, as a way of deciphering his ever-changing moods. He began to write songs about pain and addiction, and he composed an album about the lessons he had learned from the women in his life.

Perhaps there were some aspects of life that even art could not help him adapt to. Miller is the latest in a recent string of musicians (the E.D.M. producer Avicii, the rapper Lil Peep, Prince, and Tom Petty whose deaths are likely linked to opioid abuse. I was surprised to learn that Miller was only twenty-six; it seemed as if he’d been around much longer. If it seemed that way to me, following the ups and downs of his career, I can’t imagine what it felt like to him. By the time his fifth album, “Swimming,” was released, last month, he seemed like an old soul. In the shadow of real life, the raspy, carefree funk of “What’s the Use?” now feels aspirational, the bluesy pride of “Self Care” somehow insufficient. Yet “Swimming” remains an expression of wonder and contentment, no matter how fleeting. “The world is so small,” he raps, on a gentle tease of a song called “Small Worlds,” “until it ain’t.” In the sound of Miller’s playful sneer, the entirety of that vast, humbling world comes into focus. ♦