… is from page 514 of the 1988 collection of Lord Acton’s writings (edited by the late J. Rufus Fears), Essays in Religion, Politics, and Morality; specifically, it’s a note from March 30th, 1867, drawn from Acton’s extensive papers at Cambridge University:
It is possible to lose the end in a too technical regard to the means, and to sacrifice liberty by an exaggerated devotion to the forms of law.