American scholars such as Hans Kohn have claimed that the United States government institutionalized a civic nationalism based on legal and rational concepts of citizenship, and based on a common language and cultural traditions, rather than ethnic nationalism. The founders of the United States founded the country upon classical liberal individualist principles rather than ethnic nationalist principles. American nationalism since World War I and particularly since the 1960s has largely been based upon the civic nationalist culture of the country's founders.
The United States traces its origins to the Thirteen Colonies founded by Britain in the 17th and early 18th century. Residents identified with Britain until the mid-18th century when the first sense of being "American" emerged. The Albany Plan proposed a union between the colonies in 1754. Although unsuccessful, it served as a reference for future discussions of independence.
Soon afterward, the colonies faced several common grievances over acts passed by the British parliament, including taxation without representation. Americans were in general agreement that only their own colonial legislatures—and not Parliament in London—could pass taxes. Parliament vigorously insisted otherwise and no compromise was found. The London government punished Boston for the Boston Tea Party and the 13 colonies united and formed the Continental Congress, which lasted from 1774 to 1789. Fighting broke out in 1775 and the sentiment swung to independence in early 1776, influenced especially by the appeal to American nationalism by Thomas Paine. His pamphlet Common Sense was a runaway best seller in 1776. Congress unanimously issued a Declaration of Independence announcing a new nation had formed, the United States of America. The American patriots won the American Revolutionary War and received generous peace terms from Britain in 1783. The minority of Loyalists (loyal to King George III) could remain or leave; about 80% remained and became full American citizens. Frequent parades along with new rituals and ceremonies—and a new flag—provided popular occasions for expressing a spirit of American nationalism.
The new nation operated under the very weak national government set up by the Articles of Confederation, and most Americans put loyalty to their state ahead of loyalty to the nation. Nationalists, led by George Washington, Alexander Hamilton and James Madison had Congress call a constitutional convention in 1787. It produced the Constitution for a strong national government which was debated in every state and unanimously adopted. It went into effect in 1789 with Washington as the first president.
In an 1858 speech, future U.S. president Abraham Lincoln alluded to a form of American civic nationalism originating from the tenets of the Declaration of Independence as a force for national unity in the U.S., stating that it was a method for uniting diverse peoples of different ethnic ancestries into a common nationality:
If they look back through this history to trace their connection with those days by blood, they find they have none, they cannot carry themselves back into that glorious epoch and make themselves feel that they are part of us, but when they look through that old Declaration of Independence they find that those old men say that "We hold these truths to be self-evident, that all men are created equal", and then they feel that moral sentiment taught in that day evidences their relation to those men, that it is the father of all moral principle in them, and that they have a right to claim it as though they were blood of the blood, and flesh of the flesh of the men who wrote the Declaration, and so they are. That is the electric cord in that Declaration that links the hearts of patriotic and liberty-loving men together, that will link those patriotic hearts as long as the love of freedom exists in the minds of men throughout the world. — Abraham Lincoln, address to Chicagoan voters, (July 10, 1858), Chicago, Illinois.
White Southerners increasingly felt alienated—they saw themselves as becoming second-class citizens as aggressive anti-slavery Northerners tried to end their ability to take slave property to the fast-growing western territories. They questioned whether their loyalty to the nation trumped their loyalty to their state and their way of life, since it was so intimately bound up with slavery, whether they owned any slaves or not. A sense of Southern nationalism was starting to emerge, though it was inchoate as late as 1860 when the election of Lincoln was a signal for most of the slave states in the South to secede and form their own new nation. The Confederate government insisted the nationalism was real and imposed increasing burdens on the population in the name of independence and nationalism. The fierce combat record of the Confederates demonstrates their commitment to the death for independence. The government and army refused to compromise and were militarily overwhelmed in 1865. By the 1890s the white South felt vindicated through its belief in the newly constructed memory of the "Lost Cause of the Confederacy". The North came to accept or at least tolerate racial segregation and disfranchisement of black voters in the South. The spirit of American nationalism had returned to Dixie.
The North's triumph in the Civil War marked a significant transition in American national identity. The ratification of the Fourteenth amendment settled the basic question of national identity, such as the criteria for becoming a citizen of the United States. Everyone born in the territorial boundaries of the United States or those areas and subject to its jurisdiction was an American citizen, regardless of ethnicity or social status. (Indians on reservations became citizens in 1924. Indians off reservations had always been citizens.) 
With a very fast growing industrial economy, immigrants were welcome from Europe, Canada Mexico and Cuba, and millions came. Becoming a full citizen was an easy process of filling out paperwork over a five year span.
However, new Asian arrivals were not welcome. Restrictions were imposed on most Chinese immigrants in the 1880s, and informal restrictions on most Japanese in 1907; by 1924 it was difficult for any Asian to enter the U.S., but children born in the U.S. to Asian parents were full citizens. The restrictions were ended on the Chinese in the 1940s and on other Asians in 1965.
Nationalism and Americanism remain topics in the modern United States. Political scientist Paul McCartney, for instance, argues that as a nation defined by a creed and sense of mission, Americans tend to equate their interests with those of humanity, which in turn informs their global posture.
The September 11 attacks of 2001 led to a wave of nationalist expression in the United States. This was accompanied by a rise in military enlistment that included not only lower-income Americans, but also middle-class and upper-class citizens.