The 53-year-old Duke of York, in a statement, said the police had a difficult job and sometimes they "get it wrong".
Scotland Yard confirmed it had stopped the prince and said the force had "apologised for any inconvenience".
The incident happened two days after a man was arrested on suspicion of burglary inside the palace.
"The police have a difficult job to do balancing security for the Royal Family and deterring intruders, and sometimes they get it wrong," Prince Andrew was quoted as saying by BBC.
Also Read
Police said no weapons were drawn in the incident involving the duke but a Sunday Express report said that officers pointed their guns and ordered him to "put your hands up and get on the ground" after mistaking him for an intruder.
The Metropolitan Police said in a statement, "In light of media reports we can confirm that the man spoken to by officers was the Duke of York. We are making this public with HRH's permission. We are grateful to the duke for his understanding and have apologised for any inconvenience caused."
Police said a man was arrested inside the palace on suspicion of burglary, trespass and criminal damage. He was found "in an area currently open to the public during the day".
A second man was arrested outside on suspicion of conspiracy to commit burglary. Both men were bailed.
"A review of the specific circumstances of this incident is being carried out," a police spokesman said.