Herrera, 27, must complete counseling within 60 days as a condition of the dismissal.
Major League Baseball said afterward that Herrera will remain on administrative leave through Friday, when his case will be reevaluated.
His girlfriend, Melany Martinez-Angulo, assured the judge no one had pressured her to drop the case. The two emerged from the courtroom holding hands and declined to speak with reporters.
"Ms. Martinez and Mr. Herrera are looking forward to getting on with their lives and on with their loving relationship together," his attorney, Thomas Calcagni, told reporters outside the courtroom in Atlantic City.
Police were called to the Golden Nugget casino on May 27 on a report of a domestic assault. They found a woman with signs of injury to her arms and neck, which they said were caused by Herrera. Police said "handprint markings" and scratches were found on her.
He was placed on leave by Major League Baseball afterward.
Officials with the Phillies tell Action News that the team will not make a statement until after the league concludes its own investigation.
"I think 90% of everybody in this country can find a time when they made a bad judgement too. So, you know, it is just that they are in the spotlight," said Randy Carpenter of Bordentown, New Jersey.
But Marie Thistlewood from Magnolia, New Jersey says there should be a zero tolerance policy for that kind of behavior.
"I think they should cut him. I think it's bad for the city. I think it's bad for the Phillies. We're a great, clean team. I don't think we need that. You know, people are good at what they do, but there's someone else right behind them," she said.
Herrera, an All-Star center fielder in 2016, is hitting .222 with one home run and 16 RBIs in 39 games this season.
The Associated Press contributed to this report.