Following the American Civil War, if someone called you a carpetbagger or scalawag, it wasn’t meant as a compliment. The term carpetbagger was used by opponents of Reconstruction—the period from 1865 to 1877 when the Southern states that seceded were reorganized as part of the Union—to describe Northerners who moved to the South after the war, supposedly in an effort to get rich or acquire political power. A carpetbagger was portrayed as a lower-class schemer with little education who could carry everything he owned in a cheap carpet bag. These new arrivals supported the Republicans (the party of Abraham Lincoln) and were said to be corrupt profiteers who took advantage of the financial and political instability in the devastated postwar South. In reality, many of the Northerners who migrated to former Confederate states during Reconstruction were middle-class professionals seeking economic opportunities; a number also were motivated by a desire to aid newly freed African-American slaves or participate in other efforts intended to reform Southern society.
Meanwhile, white Southerners who supported Reconstruction-era Republicans were called scalawags by their political enemies, who considered them traitors to the South and just as bad, if not worse, than carpetbaggers. Scalawags included non-slaveholding, small-time farmers; middle-class professionals and others who had stayed loyal to the Union during the war. Although the exact origins of scalawag are unknown, it was in use in the United States before the Civil War as a term for both a farm animal of little value and a ne’er-do-well individual.
Today, carpetbagger remains in use, as a slur for someone who’s an opportunistic outsider, such as a political candidate who runs for office in a place where he has no deep ties or hasn’t lived in for a very long time.