Shocked bystanders took to Twitter on Friday night after witnessing the incident.
Social media users suggested the alleged attacker was carrying a sword - while others said he was holding a machete.
Photographs posted online showed police cars outside the palace and armed officers later set up a cordon.
The Metropolitan Police confirmed no other people were caught up or injured during the incident.
A spokesman said: "Officers are on scene at the Mall outside Buckingham Palace. A man has been arrested on suspicion of GBH and assault on police.
"During the course of detaining him, two male police officers suffered minor injuries to their arm.
"The London Ambulance Service were called and they were treated at the scene. They have not been taken to hospital.
"No others persons have been reported injured. Officers remain on scene and enquiries are ongoing."
The Queen is not in the capital and is currently staying at her Scottish residence, Balmoral.
Other senior royals are also on holiday.
The Buckingham Palace attack came around the same time that a machete-wielding man was gunned down after attacking a group of soldiers while shouting "Allahu Akbar" in Brussels - near a street where ISIS called for vehicle attacks just days ago.
A 30-year-old Somalian is thought to have died after injuring the troops, with witnesses reportedly hearing "two bangs" during the incident.
Belgian prosecutors said: "We believe that it is a terrorist attack."