The Phrase Finder reports thus: This is reported as originating with the nineteenth century U.S. practise of spoiling for a fight by carrying a chip of wood on one's shoulder, daring others to knock it off. This has more than the whiff of folk-etymology about it, but in fact it is the actual derivation of this phrase. The two earliest printed citations that refer to chips on shoulders bear this out.
Firstly, in 1830 the New York newspaper 'The Long Island Telegraph' printed this:
"When two churlish boys were determined to fight, a chip would be placed on the shoulder of one, and the other demanded to knock it off at his peril."
The actual phrase 'chip on his shoulder' appears a little later, in the ' Weekly Oregonian' 1855:
"Leland, in his last issue, struts out with a chip on his shoulder, and dares Bush to knock it off."