"love of one's country; the passion which moves a person to serve his country, either in defending it or in protecting its rights and maintaining its laws and institutions," 1726, from patriot + -ism.
The patriotic quip My country, right or wrong traces to a toast given by U.S. War of 1812 naval hero Stephen Decatur at a public dinner in Norfolk, Va., in April 1816, but the original seems to have been "Our country; in her intercourse with other nations may she be always right; and always successful, right or wrong." [as reported in the Pittsfield, Mass., "Sun," July 4, 1816], or similar words.
In 1823 and for a few years after, "Our Country—Right or Wrong" was printed in U.S. newspapers as the name of a song played on patriotic occasions [e.g., Pittsfield, Mass., "Sun," July 10, 1823], and by the fall of 1823 Decatur's toast was being quoted as "Our Country—right or wrong" [Hartford "Courant," Nov. 25, 1823].
The amendment often attributed to Carl Schurz in 1872, who did say it on the floor of the Senate, seems to be older:
The Hon. Israel Washburn, of Maine, gave the following felicitous sentiment at the late Bangor celebration on the Fourth:
"Our Country—Our country, right or wrong; when right, to be kept right; when wrong to be put right."
[Wheeling, W.Va., "Daily Intelligencer," July 21, 1859]