In 1897 Beattie came to Cape Town as Professor of Physics at the South African College, and he lived at Cape Town till his death on September 10, 1946.
In his early days in Cape Town, Beattie continued his research work on such subjects as the influence of X-rays, ultra-violet light, and the rays from uranium on the electrical conductivity of gases, and the leakage of electricity from charged bodies at moderate temperatures, but in 1901, in conjunction with Professor J T Morrison, of Victoria College, Stellenbosch (later incorporated with the University of Stellenbosch), he began the study of the magnetic elements as recorded at the Cape of Good Hope, and they were led on to their magnetic survey of South Africa. A report of their observations up to 1908 was published in 1909 by the Cambridge University Press for the Royal Society, and a report of their observations up to 1910 was published by the Carnegie Institution of Washington in 1912. This later report included the observations by Beattie on his arduous journey by land from Abercorn in N.E. Rhodesia through Tanganyika and Uganda to Gondokoro on the Nile. The results of further observations were published in various papers contributed to the Transactions of the Royal Society of South Africa.
In the movement which began in 1904 to obtain a charter for a University of Cape Town Beattie took a leading part and, when the Acts were adopted in 1916 constituting a University of Cape Town, one of Stellenbosch and one of South Africa, he was appointed a member of the Commission to draw up the statutes for these Universities which were to begin on April 2, 1918. In 1917 he was appointed Principal of the South African College and gave up his professorial work: in 1918 he was appointed the first Vice-Chancellor and Principal of the University of Cape Town, and that appointment he held till his retirement at the end of 1937. On him fell largely the burden of planning and carrying out the building programme for the new buildings on the slopes of Table Mountain: the move to these took place in 1928 and 1929. The high status obtained by the University, the opening of new departments and the great increase in the number of students from about 600 in 1918 to 2200 in 1938 are due largely to his influence; the great work he did for the University in its earliest days will always be recorded in any history of the University.
He was a wise and lovable man with a vast knowledge of human nature; to meet him and have a talk with him was "a real tonic". He had a great sympathy with and an understanding of the human nature in students; to them "he was just and conciliatory; he spoke in persuasive accents with a gentle humour, which robbed his rebukes of their sting, but not of their power".
In 1920 he was knighted for his services to education; in 1910 he was awarded by the South African Association for the Advancement of Science the South Africa Medal and Grant; he was President of Section A of the Association in that year and President of the Association in 1928. The honorary degree of LL.D. was conferred on him by the Universities of the Witwatersrand, Edinburgh, and Cape Town.
Among his numerous public activities were membership of the Board of Trustees of the South African Public Library, Cape Town (Chairman for several years); membership of the Scientific and Industrial Research Committee of the Union of South Africa; Vice-Chairman of the South African Broadcasting Board from 1937 to 1943.
He is survived by his wife, whom he married in 1898, and two married daughters. His only son was killed when serving with the R.A.F. in 1942. He was elected a Fellow of the Society in 1897.