Judge Nona L. Klippen dismissed two felony domestic violence charges against Foster in a San Jose, Calif., courtroom. She also reduced an illegal firearms charge to a misdemeanor, setting a pre-trial date for June 6.
The ruling by the judge came six days after Foster's former girlfriend testified that she lied about the linebacker assaulting her on Feb. 11.
Elissa Ennis recanted her charges in last week's preliminary trial, revealing that her motivation for lying to police was to destroy Foster's career after Foster wanted to break up with her.
The dismissal of the charges clears the way for Foster to return to the 49ers' offseason program on Thursday.
"The organization is aware the domestic violence charges against Reuben Foster were dismissed earlier today," said San Francisco general manager John Lynch in a statement released by the team. "As a result, he will have the opportunity to rejoin the team tomorrow. It has been made clear to Reuben that his place on this team is one that must continue to be earned. We will continue to monitor the remaining misdemeanor charge."
Foster could still face league discipline under the league's personal conduct policy. The league mandates a six-game suspension for a first-time domestic violence offense.
"We continue to monitor all developments in the matter which remains under review," NFL spokesman Brian McCarthy said in a statement.
In her initial statement to police, Ennis accused Foster of dragging her by the hair, punching her in the head eight to 10 times and physically removing her from the house.
During her testimony last week, Ennis admitted that her injuries -- including scratches and a ruptured eardrum -- were sustained during a fight with another woman in a road-rage incident.
The 28-year-old Ennis also testified that she stole money and jewelry from Foster in her attempt to get even with the player.
Foster faced charges of domestic violence, forcefully attempting to prevent a victim from reporting a crime and possessing an assault weapon, to which he pleaded not guilty.
The Santa Clara County District Attorney's Office released a statement about an hour after Klippen ruled not to go forward with a trial.
"We are disappointed in the judge's decision. We are disappointed because the evidence demonstrated that Mr. Foster seriously hurt his girlfriend," the statement read. "Some have wondered why we still think Mr. Foster hurt his girlfriend when she said that he didn't. Recantation is common among domestic violence victims. Some are scared, some feel guilty, some are coerced, some need money. Whatever the cause, we move forward on cases when victims falsely recant because we know that if we don't more victims will be hurt. Our commitment to domestic violence survivors is unwavering."
Foster, a first-round draft pick (No. 31 overall) in 2017, started all 10 games in which he played last season as a rookie.