A 44-year-old man has been charged with trespass and possession of a knife after being arrested at Buckingham Palace, Scotland Yard has said.
David Belmar, from Haringey, north London, will appear in custody at West London Magistrates' Court on Tuesday.
Police said a man had tried to enter the palace through its north centre gate at about 11:30 BST on Monday.
The man was arrested and taken to a London police station. Buckingham Palace said the Queen was not at home.
Police said in a statement that the knife was found after the man was searched, adding that no-one had been injured during the incident.
The north centre gate is the one furthest to the right in the commonest view of the palace, looking from the Victoria Memorial. It is the entrance to the palace that is in everyday use.
The incident follows the arrest last month of a man on suspicion of burglary, trespass and criminal damage after police said he had scaled a fence to get into Buckingham Palace.
A second man was arrested outside the palace on suspicion of conspiracy to commit burglary. Both remain on police bail.
Security at the palace has been breached on a number of occasions, most famously by Michael Fagan in 1982 when he broke into the Queen's bedroom.