After graduating from St Andrews in 1972, Moffat went on to earn degrees from the University of Edinburgh[citation needed] and the (then) University of London (MPhil).[4] While at Edinburgh Moffat continued his involvement in student politics, campaigning with Gordon Brown,[citation needed] the second student elected rector of the University of Edinburgh.[5][6] Moffat and Brown went on to campaign on a number of social and political issues including gay rights and the 1979 Edinburgh South by-election[citation needed].

Moffat found early success after university, becoming Director of the Edinburgh Festival Fringe in 1976. Moffat's five-year tenure saw the festival grow into the largest arts festival on the world. This was unveiled in the Scottish Parliament on 3 September[7]

Moffat left the Fringe in 1981 and joined STV, where he rose to become programme director, Chief Executive of Network Production and finally Chairman of STV.[8] While at STV Moffat won a number of awards for his work, notably several Royal Television Society awards and a BAFTA for his documentary on the Lockerbie Bombings[citation needed]. In 1989 he was appointed to the NSG, the group that controls UK wide scheduling for ITV, commanding a budget of £750 million. He left STV in 1999 to focus on writing[citation needed].

During the 1970s and early 1980s Moffat wrote a number of papers focusing on education policy.[9] His approach, recommending a renewed focus on primary education as the key to widening participation at secondary and higher levels, has since formed parts of the education manifestos of all three major parties in Britain[citation needed].

Moffat's writing since 1999 has been focused mainly in the field of social history. Beginning with The Edinburgh Fringe (1978), he has written over twenty books including the bestselling Tyneside, The Reivers and The Wall, all of which have since been remade as television series.[10]

Since leaving STV in 1999, Moffat has served as Director of the Borders Book Festival and Lennoxlove Book Festival, both of which he also founded. He has also maintained his interest in education, serving as Director of "Book Nation", a Scottish national literacy initiative, working alongside Sir Robert Winston and Margaret Drabble to improve literacy in Scotland.[citation needed]

On 28 October 2011, Moffat was elected Rector of the University of St Andrews. He was appointed for a three-year term, his period of office spanning the university’s 600th anniversary celebrations which ran from 2011 to 2013.[11]

Moffat was the chief executive of the company BritainsDNA, which offered genetic analyses of the mitochondrial DNA and Y chromosomal DNA of customers who interested in their ancestry. On the BBC Today Programme, Moffat made numerous inaccurate statements, including that the company has discovered Eve's "grandson", that prices were "heavily subsidised", and that 97% of men surnamed Cohen share a common genetic marker.[12] These statements were later retracted by the chief scientist of BritainsDNA.[13] In the meantime, two geneticists at University College London, David Balding and Mark G. Thomas, as well as other UCL colleagues, have attacked both these statements and genetic ancestry companies in general.[14] Thomas in particular has suggested that the entire field of interpretive phylogeography, on which much of such genetic testing is based, has no scientific basis and is little more than genetic astrology.[15] However, Martin Richards, Professor of archaeogenetics at University of Huddersfield, and Vincent Macaulay, reader in statistics at the University of Glasgow, have contested these claims.[16]

Sometime after the interview on the Today Programme, Balding and Thomas wrote a series of emails to Moffat and his business partners. The content of messages has never been published and is disputed between the various parties. However, it is known that Moffat wrote to the Provost of UCL to attempt to get Thomas and Balding to retract comments made in these communications and that Moffat issued a threat to sue if they were repeated. Balding and Thomas alleged that these threats were made to silence their criticism of the underlying science.[17] Moffat and his business partners claim that Thomas and Balding made a series of highly defamatory comments and never impinged on their academic freedom.[13]

Britain's DNA is one of a group of commercial companies providing DNA ancestry testing, set up by Moffat in 2012 and 2013; Scotland's DNA (the first), Ireland's DNA and Yorkshire's DNA.

Moffat was co-chairman and historian for the Great Tapestry of Scotland, a community arts project which produced the embroidered tapestry, designed by Andrew Crummy with contributions form around 1000 stitchers from across Scotland. It was unveiled on 3 September 2013 at the Scottish Parliament.[18]

Moffat met his wife Lindsay while both were students at the University of St Andrews, they were married in 1976 in the university's ancient St Salvators Chapel, a privilege and tradition commonly reserved only for alumni, staff or their offspring.[19] The couple have three children, two of whom also attended St Andrews.

He remains a passionate rugby supporter and regular attender of his national team's games. On one occasion, he refused to buy Tony Blair tickets for the Calcutta Cup (which he was attending with Gordon Brown) because Blair suggested he would support England rather than his native Scotland[citation needed].