Corstorphine Castle was built by Sir Adam Forrester some time between 1374, when he bought the lands of Corstorphine, and 1405, the year of his death. It was encircled by a curtain wall with a tower at each corner, and this was itself surrounded by a water-filled ditch, fed by the two lochs between which it stood – Corstorphine Loch and Gogar Loch.
The castle was demolished around 1797, and during the process a hoard of gold and silver coins was discovered. Despite the demolition traces of the castle were apparently still visible in 1854, although nothing now remains to be seen and the site falls within the garden of 22 Castle Avenue. A 16th century doocot belonging to the castle is still standing at Dovecot Road.
In April 1958 during the digging of foundation trenches on the Broomhall housing estate nearby (NT 1949 7231) workmen uncovered large boulders arranged in a linear fashion, suggesting the foundations of a large man-made structure. This may be something associated with Corstorphine Castle, or it may represent the remains of an earlier castle that was replaced by Corstorphine Castle. The workmen also found a 14th-15th century bronze armorial pendant, decorated with a hunting horn and traces of gilding.