The 39-year-old man walked up to Frederiksen in a downtown Copenhagen square on June 7 and punched her on her right upper arm.
The prime minister suffered minor whiplash but was otherwise unharmed.
Henrik Karl Nielsen, a lawyer for the suspect, who has not been named, told The Associated Press in an email that he will not plead guilty.
He said the suspect had no recollection of the episode.
Frederiksen was rushed to a hospital for a check-up soon after, and she cancelled her work program for the following days, including her appearance at events connected to the European Parliament elections.
The man was charged with assault against a civil servant or a person carrying out a public duty, Nielsen said.
If found guilty, the man faces fines or up to eight years in jail.
A trial has been set for August 6 and 7 in Copenhagen.
Danish media has said that the man was probably under the influence of drugs and intoxicated at the time of the late afternoon incident.
In the first TV interview days after the attack, Frederiksen said she felt shaken up and was "not quite myself".
Her security detail has been stepped up in the wake of the attack.