Anderson, Sir Samuel Lee (1837–86), and Sir Robert (1841–1918), lawyers and secret-service administrators, were sons of Matthew Anderson of Londonderry, crown solicitor for Dublin. Samuel Lee, the elder, was named after an ancestor member of the apprentice boys of Derry in 1688; after education at Rugby and TCD, he entered the legal profession, holding the posts of marshal of the high court of admiralty in Ireland (1866–8) and crown solicitor for Kilkenny and Waterford (1868–86), and was admitted to the Irish bar in 1877. Between 1865 and 1884, however, his chief role was in obtaining and organising information on Fenian activities, and coordinating action at Dublin Castle against Fenianism and political crime, in partnership with his brother Robert, whose career lay from 1867 in London. Their well known position in this field led to Anderson's becoming in 1882 one of the intended targets for assassination by the Irish National Invincibles. His personal importance diminished with the formation in that year of the new police and crime department under an assistant under-secretary, to whom Anderson acted as deputy – even before 1882, he had at times advised the Castle on conventional security matters such as the arrest of rioters. The strain of the work, however, took toll on his health. On taking early retirement from the chief secretary's office in 1884 he was knighted by the lord lieutenant, Earl Spencer (qv); he died on 1 December 1886. He married (1863/4) Elizabeth (d. 1901), daughter of Joseph Barcroft (1799–1855) of Strangmore Lodge, Co. Tyrone.
His brother Robert Anderson was born 29 May 1841 in Dublin and educated privately in Dublin and at Boulogne, Paris, TCD (BA 1862), and King's Inns, Dublin (BL 1863). Between school and college he worked for eighteen months in a Dublin brewery. From October 1860 his serious religious life began: he was an active presbyterian lay preacher, a prolific writer, and a ready controversialist. He continued legal studies, taking his BL at the Middle Temple, London, in 1870, and his LLD (Dubl.) in 1875; but in 1865 he began two decades of partnership with his elder brother in countering Fenian activities. In December 1867 he was transferred to the Irish Office, London, and assigned to a short-lived secret department; in April 1868 he began his main role as adviser to the Home Office on Fenianism and political crime, and sole channel of information from various sources – most notably T. M. Beach, ‘Henri Le Caron’ (qv) – whose identities he kept secret. In addition, he acted as secretary to royal commissions and (from 1877) as secretary to the prison commissioners in England. Described as having ‘an intelligent aversion to the civil service’, he claimed that the secret work ‘was never to my taste’ (Moore-Anderson, 37, 41); but the ‘troubles’ of the early 1880s threw him back into it. From 1882, like his brother, he reported on Fenian activities to the new Dublin department of police and crime, whose head, E. G. Jenkinson (qv), was in 1884 put in charge of this field for the UK in general. In 1886 the department ceased to exist; Jenkinson's position became untenable; and in the changes of London Metropolitan Police command in 1888, Anderson was made head of the CID, assistant commissioner, and JP for London. He became a KCB on retiring in 1901. He later revealed, however, that as an opponent of home rule he had during 1887–9 assisted The Times by writing anonymous articles for its ‘Parnellism and crime’ campaign – conduct for which he should have been dismissed, according to the Liberal government in 1910 – and helping to supply evidence, including that of Beach, to support its case. Anderson wrote (as well as many religious works) Sidelights on the home rule movement (1906), Criminals and crime (1907), and The lighter side of my official life (1910). He died 15 November 1918 of a heart attack following influenza.
He married (1873) Lady Agnes Alexandrina Moore, sister of the 9th earl of Drogheda; they had three sons and one daughter.