Note: A phrase's origins are, much of the time, completely unclear. The origins you see listed for many idioms are the plausible theories floating around for how or where they came from, but may not necessarily be accurate. The quotes which have the phrase in them are the oldest written forms of the phrase I could find, but keep in mind that older recordings are probably out there somewhere. If you find an earlier citation than what I have, feel free to let me know!
Also, remember that just because you see a saying in an old book or newspaper, let's say from the year 1893, it does not mean the saying originates from that source. In all likelihood, if an expression is already in use in a book or newspaper, then it's probably older. Nevertheless, these old quotes serve as a way to show the reader how far back in history some of these sayings go.
knowyourphrase.com - Meanings and Origins of Phrases
Being angry about something that happened in the past; holding a grudge.
The common phrase "a chip on your shoulder" is frequently spoken to those who remain upset over problems they've experienced in times past.
The origins for this phrase appear to be from the early 19th century, where a particular group of people that were looking for a physical fight would literally place a chip of wood on their shoulders and walk around, daring others to knock it off. Anyone who wanted to accept the proposed challenge could do so by knocking the chip off the person's shoulders.
The Long Island Telegraph newspaper printed on May 20th, 1830, explains:
"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."
Today, the phrase is no longer about carrying a literal chip of wood on our shoulders, but instead, when we have anger issues with others, we might be seen as carrying around a figurative one.