Hairston was facing an August hearing after being arrested June 5 on a misdemeanor marijuana charge stemming from a traffic stop. A count of driving without a license was also dropped, the court official confirmed.
Hairston produced proof he had a driver's license and had completed a drug assessment program.
The drug assessment determines whether a person has a drug problem, Durham County district attorney Leon Stanback said Monday afternoon. In a phone interview, Stanback said it's a common way for his office to handle first-time offenders on a misdemeanor marijuana charge.
"That's a standard operation," Stanback said. "I instructed my staff not to treat this case any differently than anybody else."
He added that Hairston "satisfied my assistants that he had taken care of what he needed to for the offense."
Two passengers -- Elizabeth City State player Miykael Faulcon and former college basketball player Carlos Sanford -- were also charged with misdemeanor marijuana possession. Their cases are pending with an Aug. 6 court date.
Scout.com's "Inside Carolina" reported the news earlier Monday.
Hairston was arrested during a license checkpoint in Durham while driving a rented SUV.
Officers also seized a 9mm handgun that was found outside the rental vehicle during the search.
The rental vehicle was one of two driven by Hairston and later linked to Haydn "Fats" Thomas, a convicted felon facing a pending drug case.
A school spokesman confirmed Monday the charges had been vacated but did not elaborate. It was uncertain how the dismissal of charges would affect Hairston's status with the team.
The school is already investigating whether NBA agent Rodney Blackstock has improper ties to Hairston or any other UNC athlete. Blackstock is the founder and CEO of Hooplife Academy in Greensboro, Hairston's hometown.
Coach Roy Williams said last week Hairston was facing "serious consequences" in the wake of news of the June arrest. In a statement, Williams said he hadn't determined a punishment for Hairston.
Williams said there are "several options available," including a possible suspension. The team is in the offseason so Williams said he will wait "until the process is complete" to decide on the punishment.
Hairston, a 6-foot-5½ swingman, averaged nearly 15 points per game and decided in April to return for his junior season instead of entering the NBA draft.
Information from ESPN.com's Dana O'Neil, Andy Katz and The Associated Press was used in this report.