1894, "anyone of a relationship not natural," abstracted from father-in-law, etc.
The position of the 'in-laws' (a happy phrase which is attributed ... to her Majesty, than whom no one can be better acquainted with the article) is often not very apt to promote happiness. [Blackwood's Magazine, 1894]
The earliest recorded use of the formation is in brother-in-law (13c.); the law is Canon Law, which defines degrees of relationship within which marriage is prohibited. Thus the word originally had a more narrow application; its general extension to more distant relatives of one's spouse is, according to OED "recent colloquial or journalistic phraseology." Middle English inlaue (13c.) meant "one within or restored to the protection and benefit of the law" (opposite of an outlaw), from a verb inlauen, from Old English inlagian "reverse sentence of outlawry."