Studying at the British School in Rome he returned to Scotland in 1951 to work with architect Stewart Kaye and with the National Building Record.[3]
From 1965 to 1972 McWilliam was a Council member of the influential Edinburgh conservationist group the Cockburn Association.[4]
In the 1970s, he was approached by Sir Nikolaus Pevsner who, having completed the series The Buildings of England, was keen to extend the project to cover the rest of the UK. McWilliam went on to co-write two volumes in The Buildings of Scotland series and became the project's editor.