The story
Endocentric compound of fire + fly, because the insects glow; whence also lightning bug. Compare glow fly, glowworm, and lanternfly. Compare typologically Ancient Greek λαμπυρίς (lampurís, “glowworm”) (<+ πῦρ (pûr)).
Etymology from Wiktionary, CC BY-SA 4.0.