The phrase "the butler did it" is commonly attributed to Mary Roberts Rinehart (1876-1958). Mary was a very popular writer who authored over 50 books, many of which became best-sellers. Mary (also a playwright) at one point had three plays running simultaneously on Broadway.
She also created a super-criminal called The Bat in 1920, who was cited by Bob Kane as one of his inspirations for Batman. Mary's first book The Circular Stairs was published in 1908.
In 1930, her book The Door was published and in the story the butler really did it. Although Mary Roberts Rinehart is generally credited with the origin of the expression, the words "the butler did it" do not actually appear in the book. Mary used the "butler as criminal" device in other novels as well. After that, the bit became so popular it was considered a cliche and spawned many satirical jabs.