No, not by the 5e rules as written. If you miss due to cover (half cover/-2 is standard for an intervening creature) or any other factor, you miss and there's no other consequences.
However, this is a pretty common rule and/or house rule across the various editions of D&D. Second edition, in fact, just said that if you're firing into a melee then your target is determined randomly, proportional to the size of the targets at hand, regardless of who you're targeting! Frequently people who want more granularity look at how much a blow missed by and allocate that if only for narration purposes to plain missing, the opponent dodging, it bouncing off the opponents' armor, etc.
In most of my historical games in 1e-2e, when this situation came up we'd assume that if someone or something was providing an e.g. +2 cover bonus, that if the roll missed by 1 or 2 that the attacker would roll again to see if they "hit" the cover in a damaging sense (just because you strike a covering creature doesn't mean you get a clean hit or get through its armor). In 3e+ there was usually too much else to keep track of to bother with that granularity. But you can do what makes sense for you and your group!
It has a lot to do with how granular you want to be and how much you want to make firing into melee a problem - rules implementations vary from from "no risk at all" (5e) to "well just take a -4 penalty" (3e) to "you're jeopardizing others on a miss" (what you're proposing here) to "heck you might just hit anyone around" (2e). Naturally moving the risk level of missile fire around will affect its desirability in the game. But I have to say I prefer the mild-risk aspect myself; in 3e days I often gave PCs without Precise Shot the choice "take the -4 to hit penalty - or shoot at no penalty, but you'll hit your ally if you miss by less than 4." People frequently took me up on it. Fratricide always makes things more interesting.
Also note that every group has to decide where they are on the freewheeling GM rulings-vs-rules continuum. In Basic/1e/2e days it was very common for DMs to just make up ad hoc risks/bennies of this sort on the fly based on the specific situation. "He's deliberately holding Little Timmy up as a shield, that's a +4 cover bonus for him and if you miss then for sure you're gonna gank Timmy..." In 3e and 4e days many groups were much less comfortable with this and wanted a Single Always Applicable Rule of Truth (tm). There's nothing wrong with either and I very much prefer the former, but you'll want to all be on the same page especially if anyone in your group is coming in with expectation formed by any previous edition.