Snoop Dogg has pleaded guilty to one count of possession of a dangerous weapon, his lawyer has said.
In a plea deal, the 35-year-old rapper was sentenced to 160 hours of community service and three years probation by a court in California.
He was also ordered to make a $10,000 (£5,000) charitable donation.
Snoop Dogg, real name Cordozar Calvin Broadus Jr, was arrested a year ago after the discovery of a collapsible baton in his computer bag.
Authorities said that the baton was a dangerous weapon. Snoop Dogg said it was a prop for a video that he was filming in New York, according to Metro.