Firefly luciferase is homologous to fatty acyl-CoA synthetases from insects that are not bioluminescent. Here, we determined the crystal structure of the fruit fly fatty acyl-CoA synthetase CG6178 to 2.5 Å. Based on this structure, we mutated a steric protrusion in the active site to create the artificial luciferase FruitFire, which prefers the synthetic luciferin CycLuc2 tod-luciferin by >1000-fold. FruitFire enabled in vivo bioluminescence imaging in the brains of mice using the pro-luciferin CycLuc2-amide. The conversion of a fruit fly enzyme into a luciferase capable of in vivo imaging underscores the potential for bioluminescence with a range of adenylating enzymes from nonluminescent organisms, and the possibilities for application-focused design of enzyme-substrate pairs.