To die hard, is to shew no signs of fear or contrition at the gallows; not to whiddle or squeak. This advice is frequently given to felons going to suffer the law, by their old comrades, anxious for the honour of the gang.
Definition taken from The 1811 Dictionary of the Vulgar Tongue, originally by Francis Grose.
DutchessNathan Bailey's 1736 Dictionary of canting and thieving slang
John S. Farmer's collection of canting songs and slang rhymes