Edgar L. Layard, civil servant and naturalist, was the son of Henry P.J. Layard, a senior official in the English East India Company, and a younger brother of the diplomat and archaeologist Sir Austin H. Layard who excavated at Nineveh. Edgar was educated at a private school and then went to Cambridge with the intention of taking Holy Orders. However, finding that he could not accept all the tenets of the Church of England he decided to study Law instead, though he does not appear to have been called to the Bar. In 1844 he entered the service of the English East India Company and was stationed in Ceylon, in the Sri Lanka civil service, where his father had held a senior post. During the next ten years he collected and studied the birds and shells of Ceylon in his spare time and published some papers on the birds of the island. By 1854 his health was poor and he returned to England. On the advice of Sir Richard Owen*, the newly appointed governor at the Cape, Sir George Grey, offered him a civil service post at the Cape in the expectation that he would contribute to the study of its natural history. Layard arrived in Cape Town in December that year. He was placed in the office of the colonial secretary, Rawson W. Rawson*.
By this time the collections of the South African Museum, founded in 1825 by Dr Andrew Smith*, had fallen into decay. Sir George Grey supported a movement that resulted in the re-establishment of the museum in June 1855, with Layard as its curator. He immediately started collecting material, though all his work relating to the museum had to be performed after hours. Various items were bought or obtained through exchanges with other museums, while his enthusiasm inspired amateur collectors to donate specimens. The result was a most varied collection. From October 1856 to March 1857 the governor sent him to the east coast with the survey ship HMS Castor, visiting Mauritius (where he collected plants and found six new species of terrestrial gasteropods), some islands north-east of Madagascar, the vicinity of Mombasa, Zanzibar, the Comoro Islands, Madagascar, St Lucia, Port Elizabeth, and Knysna. On this trip he collected many shells and birds, also insects and plants. In 1858 the museum was moved to more suitable premises in the same building as the South African Library, and from 1860 Layard resided there. In 1861 he compiled a Catalogue of the specimens in the collection of the South African Museum. Part 1. The Mammalia, but no later parts were published. From August 1861, for just over a year, he accompanied the governor to Australia and New Zealand as private secretary, using the opportunity to visit museums in these countries. After his return to the Cape he was given the less demanding post of arbitrator in the Mixed Commission for the Suppression of the Slave Trade, and had more time for museum work. In 1866 he visited England and while there studied museum techniques, especially the preservation of specimens in alcohol. During his absence the museum was cared for by his eventual successor, R. Trimen*.
Layard's principal interest was in birds, and as only the incomplete works of Le Vaillant* and Andrew Smith dealt with South African species he started to compile a catalogue of local birds from travel journals and other publications. This led eventually to the publication of The birds of South Africa, a descriptive catalogue of all the known species occurring south of the 28th parallel of south latitude (Cape Town, 1867). In deference to his friend C.J. Andersson*, who was preparing a book on the birds of South West Africa (now Namibia), Layard limited his own work to the southern part of the sub-continent. He did not collect many of the birds himself, though he did collect birds' eggs which he added to the museum's collection in 1867. For information and specimens beyond Cape Town he relied mainly on collectors and informants such as Mary E. Barber* in the Eastern Cape, David Arnot* at Colesberg, Henry Jackson* at Nelspoort, and C.J. Andersson. It was the first comprehensive book on the birds of South Africa and the first of its kind published in Africa. However, though it included many more species than Andrew Smith's Illustrations of the zoology of South Africa (1849), it was not illustrated. A revised and much augmented edition, covering southern Africa south of the Zambesi River, was prepared by R. Bowdler Sharpe of the British Museum and published in parts between 1875 and 1884. This became the standard work for the country until the turn of the century. Several bird species were named after Layard, including Parisoma layardi, Layard's Tit-Babbler.
Layard was also a notable conchologist. He assembled an extensive private collection of shells, which contained many new species. Several species were named after him, including Calliostoma layardi and Crassispira layardi. He also collected butterflies, moths and ferns. His ferns went to the Edinburgh Herbarium, Scotland.
In October 1860 he was appointed as a member of the newly established Cape of Good Hope Meteorological Committee, one of the first national weather services in the world, and served as its secretary for several years. He explained the importance of the work it would be doing, particularly the accumulation of meteorological data, in an article in the Cape Monthly Magazine that year.
When the Mixed Commission was abolished in 1870 Layard left for England in October, having obtained leave from the trustees of the museum. He took a number of stone tools with him and during the year read a paper before the Ethnological Society of London published as "Note on the stone implements of South Africa" in the society's Proceedings, which were incorporated in the Journal of the Anthropological Institute (Vol. 1). The artefacts had been collected on the Cape Flats, at Sea Point, the Orange River, and the Tati goldfields, and were donated to the British Museum (Natural History). Layard never returned to the Cape, and resigned from the curatorship of the museum and from the Meteorological Committee in 1872. He then became British consul at Para (now Belem), on the north-east coast of Brazil. In 1873 he was sent to Fiji as a commissioner and was the first administrator of its government when it became a British dependency in October 1874. In recognition of his work there he was honoured as a Companion of the Order of St Michael and St George (CMG) in 1875. From 1876 to his retirement in 1890 he was consul and Lloyds agent in New Caledonia. In all these places he continued his studies of birds and shells and published many papers on the birds of Fiji, New Caledonia, Tonga, Vanuatu and the Solomon Islands (1875-1881). At some time he was elected a Fellow of the Zoological Society of London. In 1885 he donated a varied and valuable collection of 491 New Caledonian land and fresh-water shells to the Albany Museum, Grahamstown. After retiring he settled at Budleigh Salterton on the Devonshire coast with his son and second wife. He was an active, handsome and very courteous man. In September 1898 he suffered a paralytic stroke and despite a partial recovery died on New Year's day 1900.