Police Scotland said they were called at around 8.50pm on Tuesday and had a bomb disposal team check on the item.
A Police Scotland spokesman said: “We were called to the Palace of Holyroodhouse, Abbey Strand, Edinburgh, around 8.50pm on Tuesday March 23, following a report of a suspicious item. Following examination by Explosive Ordnance Disposal (EOD), it was made safe.
“A 39-year-old man has been arrested in connection with the incident. There was no threat to the public and inquiries are ongoing into the full circumstances.”
Police officers could be seen carrying out searches in the palace grounds on Wednesday morning.
Officers carrying long sticks were seen methodically combing the forecourt and grass outside the building.
Others looked down drains and underneath cars and some officers were seen putting items into clear plastic bags.
Police vehicles were stationed outside several entrances to the palace.
The Palace of Holyroodhouse is the Queen’s official residence in Edinburgh and she typically spends several days a year there.