He used this phrase in his Gettysburg Address on November 19, 1863, during the American Civil War. It was a powerful statement of the ideals of democracy and self-government that the Union was fighting to preserve.
While Lincoln is credited with popularizing the phrase, it's important to note that it wasn't entirely original. Similar ideas had been expressed by earlier figures like Thomas Jefferson and John Adams.
However, Lincoln's use of the phrase in his Gettysburg Address cemented its place in American history and culture.