The family of Ogilvy can trace their lineage back to Gillibride, Earl of Angus in the time of King David I. His 3rd son, Gilbert, assumed the name of Ogilvy from the lands in his possession in Angus according to a charter in 1172. Sir Patrick Ogilvy of Wester Powrie, his descendant, was granted the lands of Kettins in Forfarshire by King Robert I, and his son, also Patrick, obtained the lands of Ogilvy from his nephew and the lands of Auchterhouse with his wife, Marjory, daughter and heiress to Robert Ramsay of Auchterhouse. Their son, Walter, inherited the office of sheriff of Forfar from his uncle, Sir Malcolm Ramsay c1365. Sir Walter Ogilvy of Auchterhouse, sheriff of Forfar, his son, died in 1391 when opposing a band of robbers led by Duncan Stewart, natural son of Alexander, Earl of Buchan. His second son, Sir Walter Ogilvy of Lintrathen, was Treasurer of Scotland during the reign of King James I, gaining the lands of Lintrathen with his first wife. Sir John Ogilvy, his eldest son, was granted the lands of Eroly [Airlie] in 1459 and the lands were erected into the Barony of Lintrathen in 1483. Sir James Ogilvy of Airlie (died 1504) was created 1st Lord Ogilvy in the Scottish peerage in 1491 and was also ambassador from Scotland to Denmark that year. The Master of Ogilvy, son of James, 4th Lord Ogilvy of Airlie, died at the battle of Pinkie in 1547.
James, 7th Lord Ogilvy, was an ardent supporter of King Charles I. He was created Earl of Airlie in the Scottish peerage in 1639 and fought with distinction at the battle of Kilsyth. His seat, Airlie Castle, standing on a rocky promontory, had been considered impregnable until a band of Covenanters led by the Duke of Argyll swept down to attack the Ogilvies in July 1640. The Earl was at this time in England, and Lord Ogilvy, his son, made a hasty escape, leaving the castle to be plundered and burnt. James, the 2nd Earl, was later captured at the battle of Philipshaugh in 1644 and sentenced to death by Parliament, but he escaped the night before his execution, dressed in his sister's clothes. He was pardoned in 1649 by Act of Parliament and became a Privy Councillor after the Restoration.
James Lord Ogilvy (died 1731), his grandson, joined the Earl of Mar's rising in 1715 and was attainted by Act of Parliament during his lifetime and pardoned in 1725. His brother, John, succeeded him as the (titular) 4th Earl. David Lord Ogilvy (titular 5th Earl) joined Bonnie Prince Charlie at Edinburgh in 1745 with a regiment of 600 - for which he was attainted by Act of Parliament. He escaped to France after defeat at Culloden where he commanded a regiment known as 'Ogilvy's' and attained the rank of Lieutenant General. In 1778 he obtained a crown pardon and in 1783 the removal by Parliament of his disabilities. He was succeeded by his second son, Walter, as titular 7th Earl, who claimed his honours as unaffected by the forfeitures of his uncle and brother, but the House of Lords did not agree. The honours were neither confirmed nor restored until 1826 when David, 4th Earl (9th Earl) of Airlie was the beneficiary. David Ogilvy, 6th Earl (11th Earl) of Airlie (1856-1900) was a representative peer for Scotland, 1885-1900, and a Lieutenant Colonel of the 12th Lancers. He was killed in action at Diamond Hill near Pretoria in June 1900 after leading a gallant charge that saved the guns. Soon after David succeeded to the title the family seat of Cortachy Castle caught fire and the large baronial addition of 1872, designed by David Bryce RSA, was gutted.
He was succeeded by his son, another David, 7th Earl (12th Earl) (1893-1968), representative peer for Scotland 1922-1963. He was also Lord in Waiting 1926-1929 and Lord Chamberlain to Her Majesty Queen Elizabeth the Queen Mother 1937-1965. His son, David, is the 8th Earl (13th Earl) and present peer.