I swear I searched the subreddit and FAQ and didn't see this answered. So either it's commonly known and I just missed it in my education, or nobody else is curious. I presume I will shortly learn which :-)
I did some digging around the internet, and try as I might I can only find a couple of potential sources for this.
It seems that we don't know where the phrase exactly comes from. It is possible that the phrase originated after WW2 in America, refering to the fact that many soldiers returned from the war missing one or more of their limbs; the 'price' of the war for them was their arms and legs. One article discussing this phrase that I found cites a December 1951 issue of the The Long Beach Independent as one of the oldest appearances of phrase.^1 Another article I found cites a Decemeber 1949 issue of the same paper as one of the oldest appearances of the phrase.^2 That's only mariginally useful however, as it does tell us that the phrase existed after 1949, but it may have existed long before that in more colloquial usage and indeed doesn't give us any clues as to the phrase's original origin.
Another possible origin discussed in those articles is that the phrase is a reference to older expressions. Expressions like 'I would give my right arm' and what have you. It is plausible that the phrase sprung from those older expressions, though I am dubious as no other article I could find seemed to discuss that.
I would urge you to take what I say here with a pinch of salt, as I cannot vouch for the validity of those sources. However, there isn't much to go on as the origin of idioms is often vauge at best.
Sources: