A 20-year-old MC sings to 5,000 people in a suburban neighbourhood of Campinas, Brazil, near São Paulo. He raps about the pride of being born in the suburbs and the dream of having a better life. The crowd sings along enthusiastically until a different sound makes the music stop. MC Daleste, the artistic name of Daniel Pellegrine, falls to the ground after being shot in the chest. He later dies in hospital.

Four years earlier, Daleste started composing Brazilian funk songs that addressed crime, weapons and the murder of policemen. They were musical portraits of the violent allegiances forged in the suburbs of the country’s biggest city. Right before his death, Daleste had shifted his focus to another aspect of Brazil’s rising lower class: conspicuous consumption.

Brazilian funk started in the 1980s in Rio’s suburbs and shantytowns – also known as favelas. Even though it shared some of the social critique of rap and hip hop, funk gained the national spotlight with more graphic lyrics about crime and sex.

But the country has changed dramatically since then and so have its poorer citizens. After more than a decade of social welfare programmes, easy credit and an increase in general income, Brazil wants to see all its consumer dreams come true.

This helps to explain why, in 2009, “funk ostentação” was born in Baixada Santista, a metropolitan area on the coast of Brazil’s richest state, São Paulo. Forget the verses about a life of suffering and violence. Now the young MCs, following in the footsteps of North American rappers like 50 Cent, Nelly and P Diddy, rave on about their expensive cars, motorcycles, accessories and women.

For 24-year-old MC Dede, one of the pioneers of the genre, this was “a way to escape the proibidões [funk songs related to crime], after our friends started dying. We can’t give people any reason to judge us and kill us.”

Name-dropping brands like Oakley, Lacoste, Armani and Moët & Chandon, the rappers from São Paulo are former bricklayers, hairdressers and street vendors. Now, they earn vast sums each month. Their ascent is driven by another gigantic force in Brazil: social media. The MCs’ market value is measured not by their record sales, but by the number of YouTube views and followers they have on Facebook, Twitter and Instagram.

Most of the money, however, comes from concerts, or ‘funk balls’, says Dede. “The producers release the videos so that people like them [on social media] and we can perform.” It is a mistake, however, to think they don’t record full albums. They do – and they give them away for free. “My CDs usually have 9 to 12 songs, but they are promotional. We pay to make them and give them away to people [at] concerts. The response is amazing. A person takes a CD home and that same night the songs are already in his notebook and [on] YouTube. It becomes huge,” he says.

Dede used to work in a supermarket and cleaned streets for a living. Now he makes over $90,000 a month and supports an extended family of 40 people who live close to him in Cidade Tiradentes, a poor neighbourhood in São Paulo.

Guns and Gucci

Funk had been consigned to the margins of the mainstream media coverage until the death of MC Daleste in June 2013. As internet celebrities, funk MCs represented Brazil in the first YouTube Music Awards, a concert which was broadcast live in November 2013 from Seoul, Tokyo, London and Rio de Janeiro. At that point, media elites hardly knew their names.  Then rolezinhos (teenager flashmob-style gatherings in shopping centres) took the country by surprise. Many of the organisers of these events were boys from suburban neighbourhoods of São Paulo who aspire to be funk MCs and had already amassed tens of thousands of social media followers.

In December 2013, one of the usual gatherings united almost 6,000 teenagers in a shopping centre, causing panic among shoppers. Administrators reacted with police force – but the Facebook-driven events only multiplied. Teens now came in hundreds to their malls of choice singing ‘ostentation funk’ lyrics.

The message of these songs is that spending more money is a ticket to their recognition as citizens.

“The logic behind ostentation is the desire to have a better life but also to put an end to the elite’s prejudice against the lower class. The expensive clothes are an armour that protects them from it,” says Renato Meirelles, the president of Data Popular, a research institute that specialises in the consumer habits of Brazil’s lower and middle-classes.

Brazil’s lower-middle class contains about 155 million people, and they make up most of the country’s social media users, according to Meirelles. Initially resistant to being associated with the suburbs, some of the MCs’ favourite brands now want to get closer, says MC Dede: “We don’t have to run after brands which didn’t want to open their doors to us. Now, if they want to dress us, they can talk to our producers about a contract.”

Brazilian dream

Many of the 10 million funk fans spread throughout the country feel the music is a way to overcome their difficulties. The idea of “overcoming” is also commonly used by the singers to defend their odes to consumerism.

“Ostentation funk is a celebration of the… improvement [in quality of living] people have had in the last few years and a reason for the others to believe they can get there,” says Meirelles.

MC Guime, the ostentation funk genre’s biggest name, is 21 years old. He was abandoned by his mother as a baby and raised by his father, an electrician. He wrote to the BBC via e-mail from Los Angeles, where he’s been meeting idols like Dr Dre – and every step of his journey dutifully posted on his Instagram account.

“Brazilians are shopping more and people have more access to things that were considered luxury items. But people also want an example of making a living by doing what [they] like. Parties, big cars, luxury brands – who doesn’t like them?”, he says.

Guime, short for Guilherme, used to work in a grocery store and now makes around $450,000 a month. Success came fast: in little more than three years as an MC, the videos in his YouTube channel have surpassed 140 million views. His song Tá patrão – which translates as something along the lines of “Like a Boss”) – was an early success, and reached one million views in two weeks.

“In my concerts I always say that doing what’s right without harming anybody is always the best thing to do. I say that I’ve made it through my work and that it takes longer, but you get there in the end”, he says.

The MCs’ effort to distance themselves from the ‘gangsta’ image seems to have paid off, says Renato Meirelles: “Families like the ostentation funk better. They don’t swear that much and don’t pay tribute to criminals, but say it’s possible to change your life through music”.

The relationship of some with crime, however, is still there. Since 2012, at least five MCs were killed in São Paulo and in Baixada Santista. All of the crimes, including the murder of MC Daleste, remain unsolved.

“We’re separating ourselves from it, but this is never going away completely”, says MC Dede. “As much as people in the favelas like ostentation funk, they will also keep singing about their everyday reality.”

The trend has reached other popular genres, such as sertanejo – (Brazilian country music). Lately, famous ‘political’ rappers have also been participating in ostentation funk video clips – much to the discontent of their loyal fans.

With an eye on the 2014 Fifa World Cup, MC Guime released a song about football – up to a while ago, one of the few paths out of poverty available to poor youth. World famous player Neymar appears in the video, which has 23 million views on YouTube.

The uplifting song – with almost no name-dropping, apart from Neymar’s – now opens one of Brazil’s main soap operas – a sign that a popular musician has entered the first league.

Gone are the days when ostentation funk was a hidden force from the suburbs. Now it can truly show off.

If you would like to comment on this story or anything else you have seen on BBC Culture, head over to our Facebook page or message us on Twitter.