Waving the bloody shirt

"Waving the bloody shirt" and "bloody shirt campaign" were pejorative phrases, used during American election campaigns in the 19th century, to deride opposing politicians who made emotional calls to avenge the blood of soldiers that died in the Civil War. The phrases were most often used against Republicans, who were accused of using the memory of the Civil War to their political advantage. Democrats were not above using memories of the Civil War in such a manner as well, especially while campaigning in the South.
Background.
The phrases gained popularity with a fictitious incident in which Representative, and former Union general, Benjamin Butler of Massachusetts, while making a speech on the floor of the U.S. House of Representatives in April of 1871, allegedly held up a shirt stained with the blood of a Reconstruction Era carpetbagger who had been whipped by the Ku Klux Klan. While Butler did give a speech condemning the Klan, he never waved anyone's bloody shirt. White Southerners mocked Butler, using the fiction of him having "waved the bloody shirt", to dismiss Klan thuggery and other atrocities committed against freed slaves and Republicans. 
The Red Shirts, a defunct 19th-century white supremacist paramilitary organization, took their name from the term. 
In current usage, the terms, often abbreviated bloody shirt, are used more broadly to refer to any effort to stir up partisan animosity.