Weir went on a state scholarship to study oriental languages at the School of Oriental and African Studies in 1942. A year later he joined the Royal Air Force, which sent him to London University to learn Persian. He was then posted as an intelligence officer, including to Burma and Iraq. After demobilisation in 1947, he went to Balliol College, Oxford. He joined the Foreign Service in 1950, and quickly became one of its leading Arabists. His early postings included Bahrain, Doha and Sharjah. Weir's career culminated with his appointment as the United Kingdom's ambassador to Egypt (1979–1985). In 1981, he was sitting behind Egyptian President Anwar Sadat when the president was assassinated at a military parade.