Source:
http://www.democrats.org/a/200 5/06/history_of_the.php
According to the Democratic Party's official website, the donkey was first used when Andrew Jackson ran for president in 1828 and his opponents called him a jackass because of his populist points of view and his campaign slogan, "Let the people rule." Instead of being offended by this label, Jackson used their name calling to his advantage and adopted the donkey, using on his posters. He spun it around to represent his stubbornness when it comes to sticking to his views. As president, the donkey was significant "when he vetoed re-chartering the National Bank."
The donkey began being used by political cartoonist to represent the Democratic Party in the 1830s. The first time it was used was in 1837 in the cartoon entitled "A Modern Baalim and his Ass." The cartoon was used to reference the now retired Jackson, who still considered himself the party's leader. The cartoon featured a caricature of Jackson trying to get the donkey to move.
The Democratic symbol gained widespread acceptance in the 1870, when political cartoonist Thomas Nast used the donkey in a cartoon featured in "Harper's Weekly." The cartoon represented the "Copperhead Press" kicking a dead lion, a symbol of the recently deceased Edwin M. Stanton, Lincoln's Secretary of War. Nast wanted the donkey to represent the anti-war faction with whom he disagreed; however, the cartoon caught on and became a representation of various Democratic editors and newspapers.
Nast again made use of the donkey to present the Democratic Party's apprehension with the possibility of Ulysses S. Grant serving a third term. He called his illustration "Caesarism." The employed the elephant to represent the Republican Party. In a cartoon entitled "The Third Term Panic," Nast drew a number of animals that represented the different issues, running from a lion skinned wearing donkey labeled "Caesarism." In the drawing, "The Republican Vote" is symbolized by an elephant running pit containing a number of negative issues.
The donkey, although not officially adopted by the Democratic Party, was widely accepted as the mascot of the party by 1880. Many political cartoonists used it to show their regard or disdain for the party and its leaders. Over the years, the appearance of the donkey has evolved and it is still used in political ads to represent individuals in the party.
http://www.helium.com/items/1187615-the-history-of-the-democratic-donkey