Fossilized eyes permit inferences of the visual capacity of extinct arthropods1,2,3. However, structural and/or chemical modifications as a result of taphonomic and diagenetic processes can alter the original features, thereby necessitating comparisons with modern species. Here we report the detailed molecular composition and microanatomy of the eyes of 54-million-year-old crane-flies, which together provide a proxy for the interpretation of optical systems in some other ancient arthropods. These well-preserved visual organs comprise calcified corneal lenses that are separated by intervening spaces containing eumelanin pigment. We also show that eumelanin is present in the facet walls of living crane-flies, in which it forms the outermost ommatidial pigment shield in compound eyes incorporating a chitinous cornea. To our knowledge, this is the first record of melanic screening pigments in arthropods, and reveals a fossilization mode in insect eyes that involves a decay-resistant biochrome coupled with early diagenetic mineralization of the ommatidial lenses. The demonstrable secondary calcification of lens cuticle that was initially chitinous has implications for the proposed calcitic corneas of trilobites, which we posit are artefacts of preservation rather than a product of in vivo biomineralization4,5,6,7. Although trilobite eyes might have been partly mineralized for mechanical strength, a (more likely) organic composition would have enhanced function via gradient-index optics and increased control of lens shape.