The most dramatic single of last year – the song voted Guardian critics’ favourite of 2015 – featured Skepta launching a four-line manifesto. “Me and my Gs ain’t scared of police / We don’t listen to no politician,” he spat. “Everybody on the same mission / We don’t care about your isms and schisms.” On the face of it, these lyrics might seem apolitical. Skepta doesn’t care about isms, he doesn’t listen to politicians. But it runs rather deeper than that.

Shutdown isn’t a song that offers solutions. It doesn’t even diagnose any problems. But its tone – bombastic, fearless – is unmistakable. As was its promotion. Shutdown’s video was filmed at the Barbican in London, the place where Skepta’s brother, JME, had been among those artists prevented from appearing when the venue, following advice from City of London police, pulled a show in February 2014. To launch Shutdown, Skepta played an illegal gig in a car park in Shoreditch – the east London area where so many grime nights had been shut down by the authorities for dubious reasons – encouraging 2,000 grime fans to shout “fuck the police” in unison. For Skepta and his fans alike, Shutdown was a triumphant return of the repressed: “They’re going to try and find every way to stop me doing what I’m doing,” he said to me the following day, “but because I come correct every time, they’ve got nothing.”

Like beauty, a musician’s politics is often in the eye of the beholder. Last month, a headline on the Complex website asked whether 2016 was “the year grime would become an anarchist genre”. It seemed like a pretty far-fetched suggestion: history does not suggest that Peter Kropotkin’s vision of a revolutionary egalitarian society was predicated on Skepta getting a tattoo of a circled A on his leg. Likewise, recent headlines such as “Skepta and Stormzy speak out against Syrian airstrikes” are unlikely to cause David Cameron great concern – particularly as they refer only to a handful tweets, although, Skepta’s “SMH @David_Cameron” (it stands for Shake My Head) has to be one of the most succinct condemnations of the prime minister to date.

After some fans told Stormzy to shut up and stick to music, he responded in his next track, Hear Dis: “They said I can’t tweet about the government, why can’t I be free any more? / I’ll expose these racist clubs and feds who can’t move me any more.” The hotly tipped young MC Novelist, meanwhile, has started 2016 with an overtly political approach. The instrumental David Cameron Riddim was followed by the nihilistic, edgy Street Politician. Novelist’s bleak lyrical depiction of violence and “black boys stuck in the system” was juxtaposed with swirling sirens and a repeated sample of the prime minister assuring a post-riots Britain that “keeping people safe is the first duty of government”. Novelist’s message is clear: some are kept safer than others. At the start of this month, he followed it with another new track, Break in Your House, on which he said: “Not enough man like me are voting / But man are on the blocks, chatting shit, moaning.”

Grime might be more visibly political than it has been for some time, but that’s more a reflection of the attention brought to the genre over the past few months by Skepta, JME, Stormzy, Novelist and others. Grime has always been political, but its politics just haven’t been those of the ballot box. They are the politics of the community – a community that party politics rarely engages with in any depth greater than lip service.

Grime stalwarts including Durrty Goodz, Bashy, Neckle Camp and Ghetts (who once sampled Martin Luther King’s “I have a dream” speech and Dire Straits on the same song) have long made homages to figures such as Malcolm X, Marcus Garvey and Nelson Mandela in their work. And while their music often plays with violent imagery, plenty of grime MCs have, at some point, appealed to fans to reject conflict and instead work positively for their communities.

Stormzy’s tweets to David Cameron over Syria were a high point of political debate. Photograph: Andrew Benge/Redferns

Perhaps the greatest of these was Bashy’s 2007 single for Black History Month, Black Boys, a self-empowerment project of epic proportions, which also displayed the scene’s ability to transcend the me-first world of the MC and behave as a cohesive musical community. Bashy recorded six different versions of the song, featuring more than 20 MCs. “Look, no we ain’t hooligans, just young and talented nubians,” he rapped on the original, bigging up Apprentice winner Tim Campbell and barrister and TV personality Shaun Wallace as role models alongside the likes of Wiley, Kano and Dizzee Rascal.

Occasionally, grime MCs have been persuaded by the authorities into more serious musical preaching. Roll Deep’s 2006 song and video Badman, a cautionary tale about gun crime, was produced in aid of Stop the Guns, a campaign organised by the Metropolitan police’s Trident division, which is charged with tackling gun crime in the black community. Riko Dan’s Phone Call covered similar ground in 2010. An even more unlikely collaboration was forged that year between MC Ghetts and the Office for National Statistics, in a campaign to reach young BME Britons who had not registered for the 2011 census. “I don’t want to get political, but it’s the principle: there aren’t enough of us filling in the forms,” he raps on Invisible, trying not to look embarrassed. As awkward and obscure as the collaboration was, the track inadvertently reveals what might be grime’s greatest political power: the genre’s ability give a voice to the voiceless.

Grime exploded from the council estates of inner London in 2003. Grime producers and MCs seemed to depict a world unknown to anyone who lived outside it. The context is easily forgotten: to be a young, working-class black Londoner in the 2000s put you at a higher than average risk of being a victim of crime – many young grime musicians have been stabbed or even died, while others wrote lyrics about the dangers of straying outside your estate and being caught “slipping” (a notion later sensationalised by the press as “postcode wars”).

Even down to its claustrophobic production values and uncompromising, rapid-fire beats, grime thrived in part because it described the flaws in New Labour’s otherwise confident, wealthy, “modern” Britain. While the grime kids’ neighbours in Canary Wharf inflated the bubble that would help destroy the global economy, life for the other half was marked by knife crime “epidemics” and moral panics over “hoodies” and “Asbo kids”. Tony Blair decried a “culture of disrespect” and backed shopping centres that were banning anyone wearing hooded tops – it was no wonder that one of Dizzee Rascal’s most memorable observations/boasts on his Mercury-winning debut album was “I’m a problem for Anthony Blair”. As leader of the opposition, David Cameron tried to have his cake and eat it, famously proposing to “hug a hoodie”, but also blaming violent rap lyrics for real-world violence – and leading to an inspired Lethal Bizzle piece for the Guardian headlined “David Cameron is a donut”.

It is music that above all describes poverty and alienation, as a teenage Dizzee says on Boy in da Corner: “Queen Elizabeth don’t know me so, how can she control me when, I live street and she lives neat?” Devlin’s melancholic Community Outcast took in the full gamut of social exclusion in 2000s Britain – homeless people, drug users, single mums, those “cold, tired and feeble”. Grime’s knack for social commentary is addressed pithily in Rival’s 2011 single Talk That: “They want to know why there’s all this anger, all this pain / They want to know why I talk that violence, talk that slang,” he spits, addressing his comfortably positioned critics, before providing them with an answer both fatalistic and profound: “I just say, ‘It’s all I know.’”

Novelist is one of a number of MC who have brought renewed attention to grime. Photograph: Suki Dhanda/The Observer

While a lot of grime is playful or ferociously energetic, there is also a great tendency for painful introspection, the kind of weed-blurred reflections and self-help anthems written by people who haven’t ever been helped much themselves. It is music made by those who have grown up with a permanently hostile relationship with the authorities – grime’s incubator, the pirate radio stations of early 2000s London, existed permanently on the run from the authorities, the transmitters and studios hastily and secretively established on tower-block rooftops. Arrested while attempting to set up a radio rig on a rooftop in Shadwell in east London, DJ Slimzee, possibly grime’s greatest ever DJ, was given an Asbo in 2005 preventing him from going above the fifth floor in any building. “I know it was breaking the law, but we were trying to help our listeners,” he said in a moving interview last year; the Asbo ruined his career, for the best part of a decade, and brought on a nervous breakdown.

Raves, meanwhile, were also a target for the police, who waged a war on grime as the decade wore on, regularly shutting down club nights because of “intelligence reports” about possible violence. The police openly targeted black music and monitored audiences’ ethnic composition through the notorious Form 696. Pressure from the authorities caused jitters in venue owners, leading to the demise of seminal grime nights that had only ever been peaceful.

Since the outcry over Form 696 in 2009, the police have learned only to divulge even less information about their monitoring and spiking of nights involving black music: the cancellation of that Barbican show in 2014 was never fully explained by the venue or the police . The casual, everyday discrimination against young black men comes through in JME’s extensive, always polite, always exasperated filming of police stop-and-search incidents against him while driving. “Frequently I get stopped by the gammon,” he lamented on 2012 single 96 Fuckries, “coz my whip looks like it should be owned by Jeremy Clarkson or Richard Hammond. Feds pull me like I’m a drug baron, chatting bare shit, can’t understand ’em.”

When the UK’s biggest student protests since the 1960s erupted in 2010, and the undergraduates were accompanied by thousands of sixth-form students angry with the scrapping of their weekly education maintenance allowance, the soundtrack swung away from punk anthems and singer-songwriters, to four-minute grime assaults like Lethal Bizzle’s Pow! and Tempz’s Next Hype – the latter a tune so incendiary that even its instrumental version had once been banned in some clubs.

When English cities were convulsed with riots in 2011, the community at the heart of it was the same one that had produced grime: Mark Duggan, whose death at the hands of the police kickstarted the riots, had been a childhood friend of several grime MCs from Tottenham, even appearing in a Skepta video. As rioters besieged Tottenham police station, another high-profile local MC, Scorcher, revealed that Cynthia Jarrett, the woman killed by police in 1984 that instigated the Broadwater Farm riots, was his grandmother. Several MCs made tracks about the riots, and when I interviewed Lethal Bizzle that week, he addressed his comments straight to his old nemesis David Cameron: “Don’t dismiss us. You’re a millionaire guy in a suit, your life is good – you can’t relate. These kids can relate to people like myself, Wiley, Dizzee, Tinie Tempah, Tinchy: we’re from the council estates, we lived in these places where they live, we know what it’s like. We’re the real prime ministers of this country.”

The last few years have seen the repetition of a familiar lament in the music press: “Where has all the protest music gone?”; Why won’t somebody “pick up a guitar and howl their outrage”? These questions speak to a different era in music, and it is no coincidence that many of the complainants remember the likes of Billy Bragg and Paul Weller creating the Red Wedge tours, uniting music and politics from offices within the Labour party’s headquarters. The very fact that the 80s bands who took part in Red Wedge were able to organise alongside an institution like the Labour party reflects the politics of that era, and the proximity of those musicians to organised party politics. It is very hard to imagine an equivalent today. Grime reflects the politics of its environment and its age.