Police Scotland said they were called to the Queen’s official residence in Edinburgh at about 8.50pm on Tuesday.
The bomb disposal team was called to the scene to examine the item and made it safe.
A 39-year-old man has been arrested and charged in connection with the incident.
A Police Scotland spokesman said: “We were called to Holyrood Palace, 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. There was no threat to the public.
“A 39-year-old man has been arrested and charged in connection with the incident and is due to appear at Edinburgh Sheriff Court on Thursday, March 25.”
It is understood the device was not viable and the EOD attended as a precaution.
Police officers carried 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.