Needles and other debris were found on a mile-long stretch of Avalon beach within 12 hours.
McFarland was charged on Thursday night, Milgram said.
Markings on the wrapper for a dental-drill bit and the labels on the needles pointed investigators toward McFarland even before he turned himself in, Milgram said.
McFarland was charged with illegally disposing of a pollutant and medical waste, including more than 300 Accuject-brand needles, 180 cotton swabs, capsules holding dental-filling material, and other items. Each charge carries a sentence of up to five years in prison and fines that could total $125,000.
"Many people who live or vacation at the Jersey Shore could not enjoy one of New Jersey's most precious natural resources" because of McFarland's act, Milgram said.
Avalon beaches were closed five days as waste washed ashore between Aug. 23 and Tuesday. McFarland, who goes by the name Tim, owns a home in the nearby Avalon Manor section of Middle Township. His dental practice is in his residence on the 300 block of Penn Road in the Lower Merion neighborhood.
Milgram said McFarland's action was an isolated incident unrelated to the syringes and debris found on beaches in seven other Shore towns, including Atlantic City, Ocean City and Brigantine. She said the findings there might be the result of copycats or normal debris spotted due to increased awareness by beachgoers after the Avalon discoveries.
Milgram would not discuss McFarland's motive or his whereabouts, or comment on published reports that the dentist was undergoing medical treatment.
A spokeswoman for Wildwood lawyer Joseph Rodgers, who is representing McFarland, said Rodgers had no comment.
In saying that McFarland acted alone, Milgram attempted to calm concerns about safety at the Shore, which thrives on tourism and whose residents are protective of the environment.
"I want everyone to understand that New Jersey's beaches are clean and safe and that this is an isolated incident," Milgram said.
Shore officials and business groups said they believed the recent events would not have a lasting negative impact on tourism because the most significant medical debris had been traced to one person.
"I think people understand that this has been an individual or individuals that have caused this pollution. It's not a policy issue, it's not any lack of responsibilities on behalf of municipalities here in Cape May County or any part of the state," said Vicki Clark, president of the Cape May County Chamber of Commerce, which represents more than 950 businesses.
Avalon Mayor Martin Pagliughi was pleased that the investigation concluded quickly. He recalls the late 1980s, when waste washed up on the Jersey Shore and became fodder for late-night television jokes.
"We're glad it was cleared up, that it was a specific, localized event," Palughi said.
A wrapper and needle labels helped investigators confirm that McFarland was responsible for the dumping. Detective Steven Ogulin of the Attorney General's Office tracked a wrapper for a small dental-drill bit found among the Avalon debris to a Georgia company, Microcopy.
According to Ogulin's affidavit, Microcopy sold the bit to very few customers in this part of the country. McFarland was on its list.
Another company identified McFarland as a consumer of the 27-gauge dental needles that washed ashore.
Milgram, who said McFarland may have turned himself in when he realized investigators were closing in, attributed the findings to "great work" by several law enforcement agencies working together.
She said searches of McFarland's homes turned up evidence that linked him to the dumping, but she would not say what was discovered.
Avalon Police Chief David Dean compared the search for the source of the needles to the movie Jaws, in which a giant shark terrorizes a New England vacation town.
"I could not be happier. I feel like Chief Brody when he got the shark," Dean said.
The Pennsylvania Board of Dentistry has no record of any disciplinary actions against McFarland, according to Leslie Amoros, press secretary for the Department of State, which oversees such boards.
His license is in good standing, she added.
Milgram said syringes found on other beaches were the kind that can be used at home. Though they were improperly disposed of, they are not subject to the same regulations as waste from medical offices.
Materials have also been found in Atlantic City, Brigantine, Ocean City, Sea Isle City, Stone Harbor, Cape May, and Strathmere in Upper Township.
More than 100 unused, individually wrapped hypodermic needles were found under Atlantic City's Steel Pier on Wednesday.
State Sen. Jim Whelan (D., Atlantic) said in an interview Thursday that investigators believe those needles were likely deposited on the beach, not dumped at sea. He said the waters on Wednesday were particularly rough and that if the needles had been in the ocean, they would have spread out over a wider distance rather than the 150-foot area in which they were found.
He said the incident may have been the work of an imitator.
Contact staff writer Jonathan Tamari at 609-989-9016 or email@example.com.
Inquirer staff writers Mario F. Cattabiani, Jennifer Lin and Derrick Nunnally contributed to this article.