Police arrived on the scene 10 seconds after the 11:55 a.m. incident, The Daily Telegraph reported. The man began to ran at police before they fired a stun gun at him.
A video posted on YouTube shows the man taking swipes at an officer as the stun gun is fired, The Independent said.
Witnesses told the Telegraph the man, in his 50s, had two knives and was shouting unintelligibly.
The incident occurred at 11:55 a.m. and the man was arrested on suspicion of causing an affray, The Independent reported.
A Buckingham Palace spokesman said he would not comment on the incident.
The queen and the duke of Edinburgh were at Sandringham, The Independent said.