Lincoln's purpose for writing and delivering the address was to honor the sacrifice of the fallen soldiers and to provide meaning to the Union's cause in the Civil War. The speech sought to reframe the war as a struggle for the preservation of democracy and liberty, rather than simply a battle over states' rights. It also emphasized the importance of continuing the fight until the Union was preserved.
Overall, Lincoln's Gettysburg Address is considered one of the most important speeches in American history and remains a powerful statement on the principles of democracy and freedom.