Experts believe they have found a carved stone which would have been fired from a giant catapult during the pivotal siege in 1296.
It led to Edward I seizing control of the medieval fortress, plundering its treasures and shipping them to London, and the castle being held under English rule for 18 years.
Archaeologists made the discovery at the site of the proposed new Virgin Hotel, which is earmarked for a large swathe of Edinburgh’s Old Town.
The dig, which has been ongoing in the Cowgate since May, has also unearthed remains of some of the earliest homes to be built in the city centre, which are believed to date back to the 12th century, along with prehistoric bones.
The stone ball is believed to have been fired by a trebuchet – the powerful catapult used by Edward I’s forces to lay siege to Edinburgh and Stirling castles. It is thought the “Warwolf” deployed in the Stirling siege, and featured in one of the most spectacular scenes in the new Robert the Bruce netflix film Outlaw King – was the biggest trebuchet made anywhere in the world.
John Lawson, the city council’s archaeologist, said: “It looks like the type of ball which would have been fired by a trebuchet, one of the most powerful catapults used in the Middle Ages.
“We always knew this area could shed new light on this era of Edinburgh’s history and here we are with the discovery of a medieval weapon. It’s a really exciting find.”
Richard Conolly, an archaeologist with heritage consultants CGMS, who have been working with the city council on the dig, said: “Most of our work deals with the remnants of day-to-day life. So it is really exciting for the team to find something that potentially provides a direct link to an historic event and specific date.
“The siege only lasted three days – we don’t often get that kind of precision in our dating.
“It is also a reminder that it was not just the castle that was involved in the siege – the surrounding town must also have taken a battering.”
It emerged last February that Sir Richard was planning to open his first Virgin Hotel in Europe at a site which includes the former India Buildings on Victoria Street and a gap site behind the Central Library. Around 200 jobs are predicted to be created with the expected opening of the 225-room hotel, which will boast several bars and restaurants, in 2020.
Donald Wilson, culture leader at the city council, said: “I never fail to be astonished by the discoveries made by archaeologists in Edinburgh, but this really is a remarkable find.
“It just goes to show how important it is that we take the opportunity with every major development in the city to investigate what’s underneath with a thorough excavation.”
Nick Finnigan, executive manager at Edinburgh Castle, said: “This is an exciting new discovery which helps contribute to our understanding of the castle’s remarkable history - particularly during the Wars of Independence.
“Edinburgh Castle has been besieged more than any other castle in the UK and it’s incredible that we are still uncovering artefacts from these historic sieges.”