The phrase ‘to be yellow’ or ‘to be yellow-bellied’ (to be a coward) seems to enter English first in the 19th century in America. The origin of the phrase is unknown.
In his ridiculous trashfest, How The Irish Invented Slang, Daniel Cassidy claimed an Irish origin for the expression. He said that it comes from the Irish éalú, which is a verb meaning to escape, to abscond or to steal up on. This is ridiculous. Irish has perfectly good ways of talking about cowardice. You can call someone a cladhaire, or a meatachán. But you wouldn’t talk about someone being ‘an escape person’. Not in English, not in Irish. Probably not in Urdu or Swahili or any other language.
By a strange irony, this is probably one of the rare instances where the origin of the expression is to be found in the Irish language. Probably … But it has nothing to do with éalú. The fact is that in Irish, you can say of someone who is a coward that they have ‘yellow clay in them’ – tá cré bhuí ann. I have always assumed that this means that the pot or whatever you are making is weaker if an inferior kind of clay is found in it, so it breaks up when fired. There is a pretty good case for saying that this phrase explains the origin of the expression yellow for cowardice in English. If Cassidy had known any Irish, he would perhaps have been able to make a good argument for this one.
But Cassidy didn’t know any Irish and he couldn’t be bothered learning any before setting himself up as some kind of expert.