William Allen, the eldest of the six sons of Job Allen (1734–1800) and his wife, Margaret Stafford, was born on 29th August 1770 at Spitalfields. His father, a silk manufacturer, was a member of the Society of Friends. He was educated at a Quaker boarding-school at Rochester before joining the family business. Allen had a strong interest in science and went to work for Silvanus Bevan who had chemical establishment near Lombard Street in London.
In 1794 he met Thomas Clarkson and joined his campaign against the slave trade. Clarkson described him as the "greatest man in Europe". According to Ellen Gibson Wilson, the author of Thomas Clarkson: A Biography (1989): "Allen... became Clarkson's most influential friend and collaborator...from the beginning of the public campaign he had been an ardent supporter. Clarkson loved him like a brother." Allen became a member of the Society for the Abolition of the Slave Trade. Other members and supporters included Granville Sharp, William Dillwyn, William Wilberforce, John Wesley, Josiah Wedgwood, James Ramsay, Charles Middleton and William Smith.
On the retirement of Silvanus Bevan in 1795 Allen took over the business and opened a laboratory at Plaistow. He became a fellow of the Linnean Society in 1801 and of the Royal Society in 1807. He also lectured at Guy's Hospital. At the request of his friend Humphry Davy he also lectured at the Royal Institution.
After the passing of the Abolition of the Slave Trade Act in 1807 Allen became an active member of the African Institution. He was also active in promoting education and was a member of the committee formed in 1808 for the support of Joseph Lancaster, the founder of the monitorial school in Southwark. According to his biographer, Leslie Stephen: "In 1814 it became the British and Foreign School Society. Allen was its treasurer and steady supporter. Under his guidance, the committee paid Lancaster's debts, pruned the monitorial institution at Borough Road of extravagances, set up an enlarged committee to raise subscriptions, warded off the challenge of the Anglican National Society, and, after more extravagances and indiscretions, ousted Lancaster from control of the institution."
In 1814, Allen joined with Robert Owen, Jeremy Bentham, and four other partners, to buy the New Lanark Mills from Owen's previous partners in order to establish a model industrial community. Allen came into conflict with Owen concerning his atheism. In 1824 overcame Owen's objections to establish biblical instruction in the New Lanark schools, and in banning the teaching of singing, dancing, and drawing. Owen described Allen as a "meddling character" and gave up his partnership in 1829.
Allen made several visits to the continent where he examined schools, prisons, and social institutions. As Leslie Stephen points out: "In interviews with statesmen and rulers, including the crown prince of Prussia, the king of Bavaria, and the king and queen of Spain, he encouraged them to adopt his ideas for reforms. In Britain he took an interest in many philanthropic causes: he promoted schools and district visiting societies, and gave evidence on the education of the poor to two parliamentary select committees. He also campaigned for the abolition of capital punishment and the protection of the Greeks, corresponding with the duke of Wellington and other political leaders."