In the 12th century, the honour of Morton was a possession of Dunegal, Lord of Strathnith (Nithsdale). A ditch to the south of the castle is thought to date from this period, although it may be natural. During the reign of Robert the Bruce the lands of Morton were held by Thomas Randolph, later the first Earl of Moray. By 1307, and possibly as early as the 1260s, a castle had been constructed here, on a high defensible promontory surrounded by marshland. Randolph also constructed an enclosed deer park nearby.
The Treaty of Berwick in 1357, which secured the release of David II, also required the Scots to destroy thirteen castles in Nithsdale, including Morton. It is not clear how much, if any, of the original castle remains.
The lands of Morton passed to the earls of March, who probably built (or rebuilt) the existing castle in the early 15th century.
In the mid 15th century the lands were given by James II of Scotland to James Douglas of Dalkeith, later Earl of Morton (although the earldom is named for another Morton in Lothian.
The fourth earl of Morton was executed in 1580 for his alleged part in the murder of Lord Darnley, and Morton Castle, together with the earldom, briefly passed to John Maxwell, 7th Lord Maxwell, and grandson of the third earl. However, in 1588, James VI led an expedition against the Catholic Maxwells. Morton Castle was taken and burned, and returned to the Earls of Morton, the fourth earl's attainder having been reversed.
In 1608 the castle was sold to William Douglas of Coshogle, who sold it in turn to William Douglas of Drumlanrig (later the first Earl of Queensberry) ten years later. The castle was at least partially occupied until 1714, probably serving as a hunting lodge rather than a dwelling. A dam was constructed in the 18th century to flood the marshland, creating the artificial loch which now surrounds the castle on three sides.
Following its abandonment in the 18th century, much stone was carried off until the 1890s when some repairs were carried out. It is now the property of the Duke of Buccleuch, and is cared for by Historic Scotland. Morton Castle is a Scheduled Ancient Monument.
There is some debate as to the precise date of the castle. Gifford discusses the possibility that the defensive structures date from the original, 14th century castle, which was then rebuilt as a hunting lodge in the 15th century. However, he concludes that it is not impossible that the majority of the castle dates from the 15th century.
Architecturally the castle bears some resemblance to Caerlaverock Castle, being triangular in plan, with similar twin gatehouses at the south-west corner. One of the two D-plan towers still stands to four storeys, and has a pit prison below. Above this were several rooms which probably served as the lord's lodging, as suggested by an elaborate fireplace in one room. Only the foundation of the second gate tower remains. The gate originally had a portcullis, and a turning bridge over a pit.
This high level of defensive architecture contrasts with the main range of buildings across the south of the castle. Here, large, fine arched windows and a lack of arrow loops suggest that this range was either built or remodelled as a hunting lodge. The long two-storey block had a large first-floor hall, with basement rooms below. At the east end, a private room opened off the hall, connecting to rooms in the round south-east tower.
To the north, the walls which flanked the edges of the marshland have been removed, leaving the former courtyard open.