The 35-year-old rapper, born Cordozar Calvin Broadus Jr., agreed to five years' probation and 800 hours of community service. He faced charges of gun possession by a felon and sale or transportation of marijuana.
He said little other than "no contest" when the charges were read.
Snoop Dogg's recent arrests marked the end of a relatively long trouble-free stretch for the rapper. He has burnished his image in recent years with appearances in mainstream movies and by starting a youth football league.
He was arrested at Bob Hope Airport in Burbank, Calif., last Oct. 26 on suspicion of transporting marijuana. Police later found a gun at his home. If convicted at trial, he could have faced up to four years in prison.
Los Angeles County Superior Court Judge Terry Smerling placed conditions on the probation, including that only 400 hours of the community service could involve the youth football league.
The judge also ruled that Snoop Dogg could not have any gang members in his entourage and must notify the probation department before leaving the state. The rapper must also provide authorities a DNA sample and he must have a medical permit if he uses marijuana.
Teenagers screeched when the music star strutted down a hallway to the courtroom. Court security ordered them to stop taking pictures.
Defense attorney Donald Etra said outside court that Snoop Dogg smokes marijuana because he has migraines and has a medical permit under state law.
Etra said Snoop Dogg's security staff and drivers are all currently licensed by the state and they and his entourage do not include gang members.
"Snoop's position is he wants to give children and teenagers an example to follow," Etra said of the football league.
Etra said that Snoop Dogg "recognizes he got a great deal" given his prior convictions.
If he violates probation he will be sentenced to three years in state prison. The two charges to which he pleaded do not count as strikes under the three-strikes law because they did not involve violence, said district attorney's spokeswoman Sandi Gibbons.
Snoop Dogg also faces separate felony charges stemming from the Sept. 27 discovery of a collapsible baton in his computer bag by a security screener at John Wayne Airport in Orange County.
Authorities allege the baton was a dangerous weapon. Snoop Dogg has said it was a prop for a video he was filming in New York and pleaded not guilty.
Etra called those charges "bogus."
"We intend to vigorously defend them," the attorney said.
Snoop Dogg was convicted in 1990 of cocaine possession and charged with gun possession after a 1993 traffic stop. He pleaded guilty in exchange for three years' probation and a promise to make public-service announcements against violence.
He was acquitted of a murder charge in 1996 after the death of an alleged street-gang member killed by gunfire from the vehicle in which Snoop Dogg was traveling.
By Andrew Glazer
By Andrew Glazer