Alfred Lyall was the youngest son of John Lyall (1752–1805), of Findon, Sussex, and Jane Comyn (c.1756–1824). His eldest brother George Lyall, sometime member of parliament for the City of London, became Chairman of the East India Company. Of his other brothers to reach maturity, John Lyall was a Lieutenant-Colonel in the Bombay Army, at that time under the command of the East India Company, Haseldine Lyall joined the Royal Navy, while William Rowe Lyall entered the church and became Dean of Canterbury.
Lyall was educated at Eton, matriculated at Trinity College, Cambridge, in November 1813, and graduated Bachelor of Arts in 1818. Following this he spent some time studying and travelling on the Continent, with extended stays in Frankfurt and Geneva. Lyall was especially drawn to Italy, where he acquired some knowledge of art. He was an incessant reader, a serious student of history and philosophical works, but also a lover of poetry.
By 1820 all of Lyall's surviving brothers and sisters were married and settled, while he was still a bachelor, living with his widowed mother at The Square, Findon, West Sussex. The property is known today as Grey Point. Findon records show that another property called Avery's, larger but less elegant, located a short distance away, also belonged to the Lyall family around this time.
Lyall literary leanings brought him an invitation to become editor of The Annual Register, an influential review, which he did from 1822 until 1827, returning to it again in 1837. The winter of 1825–1826 he passed visiting Madeira and Portugal. On his return he published in 1827 a comprehensive narrative entitled Rambles in Madeira and in Portugal. The book was accompanied by a folio volume of lithographic sketches by his friend and fellow traveller James Bulwer, an accomplished artist and keen naturalist.
Subsequently, Lyall returned to Findon and immersed himself in metaphysical studies. His elder brother William Rowe Lyall, taking him in hand, steered him towards an ecclesiastical career. The church was considered a good choice for educated gentry without private means, as it offered a secure and comfortable benefice, while generally allowing the incumbent enough leisure time to pursue literary interests. Before yielding to his brother's advice Lyall wrote a second book, entitled A Review of the Principles of Necessary and Contingent Truth, published anonymously in 1830. This was a complex metaphysical discourse mainly attacking the theories of Hume and Reid. It was intended as an introduction to a projected work of several volumes that was never executed.
Lyall took holy orders in 1829, and was appointed curate in Findon. Around the time of his ordination he became engaged to a 20-year-old girl from another old Scots family. Mary Drummond Broadwood (1809–1878) was the fourth daughter of James Schudi Broadwood (1778–1851) of nearby Lyne House, Surrey. Mary's paternal grandfather John Broadwood had established the Broadwood piano company after marrying the daughter of his business partner Burkat Schudi, the Swiss harpsichord maker. Mary's mother was Margaret Schaw Stewart (1778–1849), whose great-uncle was Daniel Stewart of Glenbuckie, best remembered for his association with Bonnie Prince Charlie and the Jacobite Rebellion of 1745.
The couple were married in December 1830 and by 1835 had moved to Coulsdon, where Alfred was acting as curate in charge. Subsequently, in 1837, he was appointed vicar of Godmersham in Kent.
At the request of the publishers Rivingtons, Lyall resumed editorship of The Annual Register after moving to Godmersham, but was soon forced to relinquish the work due to health problems. Thereafter he continued to make sporadic literary contributions to other publications. Most notably in 1848 he was asked to collaborate on the Encyclopedia Metropolitana, an ambitious project conceived by Samuel Taylor Coleridge for the dissemination of universal knowledge, and published in a series of main divisions, over a number of years, each division consisting of multiple volumes. Lyall contributed to the Third Division: History of the Christian Church, covering the fourth to twelfth centuries, which appeared in 1850–51. In 1856 he published another book anonymously, entitled Agonistes, or Philosophical Strictures, which gained him a certain literary reputation. This was his third and last sole-authorship book, a collection of polemics attacking the high churchmen’s enemies of the day, most particularly the philosophical theories of John Stuart Mill.
Nine children of the marriage survived, two of which – Alfred Comyn Lyall and James Broadwood Lyall – had distinguished careers in British India, leading to Lieutenant-Governorships and knighthoods.
The family's final move came in 1848, when they relocated to Harbledown, a small parish located on a rise overlooking the cathedral city of Canterbury, where his older brother was now Dean. Alfred did not naturally have the makings of a parish priest – he was too remote from the ordinary people of his congregation, a shortcoming his wife appears to have energetically made up for with charitable work. Despite being a little too 'broad' in his views for a country parson he seems to have given what was expected of him, and was by all accounts well liked and respected by the community he served. Nonetheless, it was wise to take the precaution of publishing his philosophical works anonymously, for it was not altogether appropriate that he should be seen by his congregation as engaging in metaphysical arguments on subjects deemed outside the realm of his parish duties. In any event, his intended circle of readers was undoubtedly well aware of the author's identity – there was little need to advertise his writings further than necessary.
Alfred Lyall remained as rector of Harbledown for the remainder of his life. He died while on a visit to Llangollen, Wales, on 11 September 1865, and was buried at the parish church of St. Michael's, Harbledown, where there is a tablet to his memory.