J Hus has been sentenced to eight months in jail after admitting carrying a knife in a public place.
The 23-year-old rapper was caught with the blade after police stopped a car near the Westfield shopping centre in Stratford, east London, on 21 June.
Snaresbrook Crown Court heard J Hus - real name Momodou Jallow - "fully accepted his actions were careless".
Judge Sandy Canavan said she would be failing in her duty if she did not jail him.
She told the rapper he was a "role model to many" but "failed" to leave his past behind him.
She added: "This, in such a young life, is the fourth occasion when you have gone out armed with a knife."
The court heard J Hus, of Baldwin Drive, Peterborough, was in his car with his girlfriend - who was driving - when they were stopped by police officers after they smelt cannabis.
They spoke to the rapper and asked whether he had anything he shouldn't - which is when he revealed he had a 10cm folding knife.
He was arrested and when officers asked why he was carrying the weapon, he replied: "You know, it's Westfield."
The court heard he said he had been shopping at Westfield and indicated his "face was known".
Henry Blaxland, defending, read out a letter to Judge Canavan on behalf of the rapper.
J Hus said he was sorry and he "fully accepted his actions were careless".
He told the court his decision to carry a knife was "ill advised" and "utterly stupid", adding: "I was not in the right state of mind."
"I'm deeply sorry and regret my foolish actions."
Mr Blaxland said the defendant's arrest has proved to be a "watershed moment".
He told the judge it had "huge consequences" to his performance schedule and the rapper knows "he has a responsibility" to others.
He said the defendant had been seeing a therapist and has mild PTSD from previously being stabbed himself.
Mr Blaxland told the court J Hus had found himself relatively isolated because of his fame.
He said he may have been drawn back to Newham, in east London - which is where he grew up - "like a moth to a flame".
By Steve Holden, Newsbeat entertainment reporter at Snaresbrook Crown Court
"As the judge gave her closing statement, J Hus sat with his head down and arms crossed in the dock.
"Wearing a black T-shirt and dark jeans, she asked him to stand up as she passed the sentence.
"He showed no emotion and said nothing after hearing it.
"His friends and family in the public gallery also remained silent as he picked up his coat and left the dock to begin his jail term."
The court heard J Hus has six previous convictions for 10 offences between 2011 and 2016 - including possession of a knife.
He also has convictions for violent disorder and has previously been given an ASBO.
J Hus initially pleaded not guilty to the charge of possession of a bladed article in a public place but changed his plea in October.
The rapper burst onto the scene in 2015 with his song Dem Boy Paigon.
His single Did You See reached number nine in the UK chart in 2017 and his debut album Common Sense reached number six.
He was nominated for three Brits at this year's award ceremony in the British breakthrough act, British album and British single categories.
The rapper has kept a relatively low profile since his arrest, and was unable to perform at TRNSMT festival in Glasgow in June and Wireless Festival in July.