This may help:
"As noted in The Quote Verifier and other sources, Lincoln’s phrase
“government of the people, by the people, for the people” is the best
known use of the of/by/for the people formula, but Lincoln probably
adapted his version from a similar phrase used in the 1850s by
abolitionist preacher Theodore Parker. During the early months of the
Civil War, Lincoln’s law partner William Herndon gave the president a
book of Parker’s sermons and speeches. It included a sermon titled
“The Effect of Slavery on the American People,” which Parker delivered
at the Music Hall in Boston, Massachusetts on July 4, 1858. In that
sermon, Parker said: “Democracy is direct self-government over all the
people, for all the people, by all the people.” According to Herndon,
Lincoln marked those words in his copy before he wrote the Gettysburg
Address. Parker had used a similar line in earlier sermons and
speeches. For example, in a speech he gave in Boston on May 29, 1850,
Parker defined democracy as “a government of all the people, by all
the people, and for all the people."
http://www.quotecounterquote.com/2010/11/government-of-people-by-people-for.html