Police Scotland said they were called to the grounds of the Palace of Holyroodhouse at about 8.50pm on Tuesday.
An Explosive Ordnance Disposal (EOD) team examined the “suspicious item” before making it “safe”, a spokesperson for the force added.
The Independent understands the suspicious item was made to look like a bomb but, after being examined, was found not to be a viable device.
Investigators believe it may have been a hoax and are not currently treating the incident as terror-related.
A 39-year-old man who was arrested in connection with the incident has now been charged and will appear at Edinburgh Sheriff Court on Thursday.
Police said there was no threat to the public and inquiries continued on Wednesday.
A spokesperson for Police Scotland said: “We were called to the Palace of Holyroodhouse, Abbey Strand, Edinburgh, around 8.50pm on Tuesday 23 March, following a report of a suspicious item.
“Following examination by [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 25 March.”
Police officers were spotted carrying out searches on the grounds of Holyroodhouse on Wednesday.
Officers carrying long sticks were seen methodically combing the forecourt and grass outside the building in Edinburgh.
Others looked down drains and underneath cars and some officers were seen putting items into clear plastic bags.
Police vehicles were also stationed outside several entrances to the palace.
Additional reporting by PA