Jiri Sklenka said he reached the decision to resign Friday after seeing television footage of the incident, in which a 26-year-old man managed to "shoot" Klaus with pellets from a replica plastic gun in the Bohemian city of Chrastava.
Sklenka told reporters Saturday he had informed Klaus of his decision to resign immediately, iDnes.cz reported.
"I decided to take personal responsibility regardless of whether the incident could or could not have been avoided," he said. "I decided to resign from my position to prevent any speculation."
Police have accused the alleged attacker, identified as Czech citizen Pavel Ondrous, of disorderly conduct, for which he could face up to two years in prison. On Sunday he was being held in a pretrial detention cell in Liberec.
He hadn't been charged with a more serious crime, such as an attack on a head of state, Czech Radio reported.
The incident came as Klaus was attending a ceremony to mark the opening of a repaired bridge. Witnesses said the man put a plastic "airsoft" gun to the president's side and pulled the trigger seven times.
The president's bodyguards didn't immediately respond to the incident, letting the man walk away.
Ondrous gave several media interviews in which he claimed he pulled off the stunt to draw attention to the plight of the Czech Republic's ordinary people before police eventually arrested him several blocks away in Chrastava Square.
Klaus was belatedly taken to Prague Central Military Hospital where he was treated for light injuries to his hands, the broadcaster said.
Critics immediately blasted the lax security shown by the incident and the General Inspection of Security Forces quickly announced it would conduct an investigation of the mock assassination.
Senior ODS Party deputy and former presidential adviser Boris Stastny said Klaus should have been taken to the hospital for a toxicological analysis immediately following the incident.
"It was not at all certain that the missiles were not poisoned or affected by radioactive material," he said.
Sklenka initially defended the actions of the security detail Friday, the Czech publication Week reported.
"It is quite clear that I'm disturbed by what I saw," he said. "On the other hand, we have knowledge of should and shouldn't be a high security risk and we analyze the whole situation, so there really wasn't a security risk," he said then.
Security expert and former head of Czech military intelligence Andor Sandor, however, called the incident a "fatal failure" on the part of the president's security guard.
He told the weekly the guards were probably too far away from the president and were poorly monitoring the individuals closest to him.
"If he had a (real) gun, we would have a dead president now," Sandor said.