The walled enclosure, believed to date from the 18th century, was discovered during renovation works at Culzean castle in Ayrshire.
The remains of the large rectangular enclosure, which measures over 60m long and 30m wide, were buried beneath the lawn of the clifftop fortress’s Fountain Court sunken gardens.
The structure is thought to have been created for Sir John Kennedy, the second baronet of Culzean, in 1733, when a garden at the foot of the terrace walls on the east side of the castle was extended.
This garden is shown on an estate map of Culzean drawn by John Foulis in 1755.
It likely functioned as an enclosed kitchen garden for the castle, with fruit trees lining the south-facing walls of the terraces.
The map appears to show rows of planted beds in a rectangular arrangement.
The garden was abandoned in 1782 and the walls demolished after a major redesign of the castle by renowned neoclassical architect Robert Adam.
As was the fashion in the late 18th century, the kitchen garden was moved away from the immediate view of the house and the site given over to wider views of the landscape.
A new walled garden was built to the south-east, just out of sight of the castle, with a date stone above the gate marked 1786.
It is likely that builders would have re-used stone from the original walled garden to create the existing one.
In the middle of the 19th century the area below the terraces was used as a bowling green before the large, ornate fountain was installed in 1876.
The area has since come to be known as Fountain Court.
Prior to the 16th century this area was a narrow glen that formed a defensive barrier to the ridge upon which the medieval castle stood.
Culzean castle was gifted to the National Trust for Scotland in 1945.
The site has a long history of human habitation, with previous discoveries including artefacts dating back to prehistoric times.
The latest find was made as part of a major project to improve the drainage at the Fountain Court and to make it suitable for staging large public events.
Derek Alexander, head of archaeological services for the conservation charity, said: “It is so exciting to see part of the original walled garden at Culzean.
“Although it was marked on the estate map, until now we never knew that any of it survived below the immaculate turf of the Fountain Court.
“This work has given us the perfect opportunity to explore a hidden aspect of Culzean’s past.”