The three most popular theories/stories for the expression “wearing your heart on your sleeve” are:

In the Middle Ages, Emperor Claudius II believed unattached men made better soldiers so he declared marriage illegal. As a concession, he encouraged temporary coupling. Once a year, during a Roman festival honoring Juno, men drew names to determine who would be their lady friend for the coming year. Once established, the man would wear her name on his sleeve for the rest of the festival.

Around that same time, it’s speculated, when a knight performed in a jousting match in the king’s court, he’d dedicate his performance to a woman of the court. By tying something of hers, like a handkerchief, around his arm, he’d let the court know the match would defend the honor of that woman.

Or, we can credit Shakespeare, where it may have first been recorded in writing:

Iago:

It is as sure as you are Roderigo,

Were I the Moor, I would not be Iago.

In following him, I follow but myself;

Heaven is my judge, not I for love and duty,

But seeming so, for my peculiar end;

For when my outward action doth demonstrate

The native act and figure of my heart

In complement extern, ’tis not long after

But I will wear my heart upon my sleeve

For daws to peck at. I am not what I am.

– Othello, Act 1, Scene 1, 56–65

More Info: www.smithsonianmag.com