He married at Cockpen, Midlothian, on 25 December 1768 Janet Rennie/Rannie, "connected by marriage with Lord Melville" (sister Elizabeth Rannie, the first wife of Henry Dundas, 1st Viscount Melville), daughter of David Rennie/Rannie of Melville Castle, Edinburgh[3] and had three daughters and six sons:
Robert Cockburn (Cockpen, Midlothian, 22 March 1771 - 1844)
Matilda Cockburn (Cockpen, Midlothian, 7 February 1772 - 1842), married at St Cuthbert's, Edinburgh, Midlothian, on 13 July 1798 to Sir Robert Dundas of Beechwood, 1st BaronetDundas (30 June 1761 - Heriot Row, Edinburgh, Midlothian, 4 January 1835), and had issue
Margaret Cockburn (Cockpen, Midlothian, 9 April 1773 - ?)
George Cockburn (Cockpen, Midlothian, 15 October 1774 - ?)
Archibald Cockburn (Cockpen, Midlothian, 10 September 1776 - ?)
David Cockburn (Cockpen, Midlothian, 9 February 1778 - ?)
John Cockburn (Cockpen, Midlothian, 8 March 1784 - ?), married at Borthwick, Midlothian, on 7 September 1821 to Eliza Dewar, and had two daughters and five sons:
Caroline Cockburn (Edinburgh, Midlothian, 19 November 1822 - ?)
Archibald David Cockburn (Edinburgh, Midlothian, 6 September 1826 - 1886), married at Edinburgh, Midlothian, on 21 October 1856 to his first cousin Johanna Richardson Cockburn (Edinburgh, Midlothian, 14 January 1831 - 1888), daughter of Henry Thomas Cockburn of Bonaly, Lord Cockburn, and wife Elizabeth Macdowall, and had one son and one daughter:
John Cockburn (1858 - 1928), married to Isobel Mary ... (1864 - 1952), and had one son and one daughter:
Henry Archibald Cockburn (1873 - 1943)
Laela Armine Cockburn (1894 - 1969)
Elizabeth Jane Macdowall Cockburn (Edinburgh, Midlothian, 20 August 1866 - ?)
Mary Elizabeth Cockburn (Edinburgh, Midlothian, 16 December 1827 - ?)
James Graham Cockburn (Edinburgh, Midlothian, 16 June 1829 - ?)
John Cockburn (Edinburgh, Midlothian, 31 May 1830 - ?)
Henry Alexander Cockburn (Edinburgh, Midlothian, 10 November 1831 - ?), General, married to Lucy Margaret Tucker
Alexander Cockburn Cockburn (Edinburgh, Midlothian, 6 July 1833 - ?)