If my understanding is correct, the term "frag" originates from Vietnam war times, and it did have to do with frag grenades. Specifically, disgruntled conscripts attempting to kill their superiors feigning misaimed grenade throws.
The way it arrived to competitive multiplayer gaming was during the development of Doom, wherein purposeful friendly fire kills in co-op mode were called "frags" informally, and through metonymy it came to mean kills in PvP modes.
oops my special interest has been activated
'fragging' is the colloquialism for troops attacking their superiors in the vietnam war (not just officers, but just as often NCOs or even just peers they disliked). it was called that because it would typically be done with fragmentation grenade, but not usually during a battle or anything. that wasn't exactly very reliable, plus it didn't exactly leave you with an isolated target
rather, it was the use of fragmentation grenades *on base*; your classic fragging consisted of rolling a fragmentation grenade under the door into the latrines at night after your target went in. this was enabled by the fact that firebases (the typical field base used by americans in the vietnam war) would have crates of fragmentation grenades easily accessible, as the response to hearing something rattle against the barbed wire at night was to simply throw a grenade at it and wait until morning to see if you got anything rather than risk being lured out. so it was a very good anonymous tool for assassinations.
the scale and fear of fragging had an enormous cultural effect on the united states. in the military, it contributed to degrading morale and a variety of programs to counter it, including the first-ever anonymous tip phone line for soldiers to complain about officers. the realization that soldiers would simply kill their superiors if pushed seriously degraded effectiveness in a war where the primary tactic was to go out into the bush and deliberately pick fights. its a huge part of why the US military switched to a volunteer model.
when stories of fragging made it home, it was an immense culture shock for midcentury america, and cemented itself into the news and media. through the 70s and 80s, there was a *lot* of US media about the Vietnam War. the stuff in the 70s was largely extremely critical and extremely cynical, largely made by people who opposed the war, but in the reagan era you saw an uptick in war action movies which... while not typically set in the Vietnam War, were largely concerned with refighting and 'winning' it in the narrative, creating big, stupid action movies like the rambo sequels
this sort of dumbass action movies, along with heavy metal and the satanic panic, heavily influence early first person shooter games. Kevin Cloud, one of the artists on the original Doom, used 'frag' as a term to distinguish killing players from killing Doom's monsters. Doom was built as a single player game first, a cooperative game second, and a multiplayer versus game third, so the language of 'you fragged X' was ported from the cooperative game (where it was used to indicate you'd killed a friendly, idiot) into the multiplayer deathmatch.
from there, it made it to Quake and Unreal, the big arena shooters of the late 90s, and remained the term pretty much until all First Person Shooters were subsumed into the increasingly military-propaganda-y Call of Duty games post Modern Warfare. i have no proof of this, but i suspect it was a term that CoD wanted nothing to do with as they became increasingly reliant on connections to the military-industrial complex, so the term was carefully kept out of marketing and slowly killed it among gamers.
it still persists in places, though. my understanding is that in modern Counter-Strike's community, people still talk about 'frags', which confuses a lot of new people!