He pleaded no contest to three felony weapons charges and two misdemeanor counts of driving under the influence in Santa Clara County Superior Court.
The 25-year-old faces sentencing just a couple of days after training camp for the Niners begins.
Smith's no contest plea means he will not fight the charges, but is also not admitting any guilt. The plea also means the Niners linebacker will avoid a trial.
Prosecutors say Smith faces a range of possible sentences, from spending no time in custody to a maximum of four years and four months behind bars. Sentencing is set for July 25.
In November, Smith pleaded not guilty to three felony counts of illegal possession of an assault weapon after deputies said they found three assault rifles while responding to a complaint about a party in June 2012 at Smith's home. Prosecutors say those rifles are illegal in California.
The DUI charges were filed in September after Smith's car slammed into a tree in a residential neighborhood in San Jose. Police said his blood-alcohol level was twice the legal limit.
Smith then went into rehab. At the time, 49ers CEO Jed York said that would support his players as long as they are willing to get better.
Smith also faces criminal charges for an incident at Los Angeles International Airport in Nov. Police say he was going through Terminal 1 screening when he made a comment indicating that he was in possession of a bomb.
That, of course, is a completely separate case. But Smith can still be suspended by the NFL.
(The Associated Press contributed to this report)