In 1871 Dunn returned to England, via South Africa, where he was government geologist for the Cape Colony reporting on mines. He prepared the first geological map of South Africa and had a part in the discovery of diamonds. In 1872 Dunn travelled through Bushmanland accompanied by 15 troopers of the Northern Border police. He gathered much information about the Bushmen which he embodied in his work on "The Bushman", which, however, was not published until nearly 60 years later. In 1873 he went to London, studied at the school of mines, Jermyn Street, and obtained his certificate for assaying. In 1883 he predicted that the Transvaal would become an infinitely richer gold-bearing country than any yet discovered.