Because they have a complex life cycle, raising fireflies is very difficult. To get from egg to adult, you will need to work out conditions that promote survival not just for the eggs, but also the larval and pupal stages. So far, scientists have been able to succcessfully rear just a few Asian firefly species (Luciola cruciata, Aquatica lateralis, and Aquatica ficta), all with aquatic larval stages.
Many people (including myself, Jim Lloyd, Lynn Faust and Larry Buschman) have tried to raise U.S. fireflies – all of which have terrestrial larvae – but without much success. If you find a mated female, it’s generally easy to get her to lay her eggs on moss. With luck, within a few weeks the eggs will successfully hatch out into tiny larvae. They’re cute and hungry! But the next step is extremely difficult: getting these larvae to eat, grow, and survive for the many months it takes before they’re big enough to pupate.
Although I’ve tried several different species, I’ve never gotten any of these terrestrial larvae to survive longer than 2-3 months. I’ve tried feeding them earthworms, snails, cat food (both wet and dry), and never gotten survival rates above 1%. So, as I recommend in Silent Sparks: Stepping Out, the best thing is to return any newly-hatched firefly larvae to their original habitat, where they’ll likely have a better chance of survival.