Melanins are widespread pigments in vertebrates, with important roles in visual signaling, UV protection, and homeostasis. Fossil evidence of melanin and melanin-bearing organellesmelanosomesin ancient vertebrates may illuminate the evolution of melanin and its functions, but macroevolutionary trends are poorly resolved. Here, we integrate fossil data with current understanding of melanin function, biochemistry, and genetics. Mapping key genes onto phenotypic attributes of fossil vertebrates identifies potential genomic controls on melanin evolution. Taxonomic trends in the anatomical location, geometry, and chemistry of vertebrate melanosomes are linked to the evolution of endothermy. These shifts in melanin biology suggest fundamental links between melanization and vertebrate ecology. Tissue-specific and taxonomic trends in melanin chemistry support evidence for evolutionary tradeoffs between function and cytotoxicity. Melanin in Vertebrates Melanins (see Glossary) are dark to rufous pigments that are widespread in vertebrates and underpin critical functions in physiology and behavior [1]. Fossil evidence of melanin extending to over 300 million years ago has triggered a paradigm shift in paleobiology, prompting remarkable reconstructions of the coloration and behavior of extinct vertebrates [2-6]. New discoveries of internal melanins in vertebrate fossils have broadened our understanding of the functional diversity of ancient melanins [7-9] and invite a re-evaluation of the macroevolutionary history of melanin and its functions. Here, we synthesize trends in the fossil record of melanin and explore fossil evidence for the evolution of melanin function and the genetic basis of melanization. This highlights the value of the fossil record as a resource for tracking melanin evolution through deep time. Functions of Melanin in Ancient Vertebrates In extant vertebrates, melanin occurs as micron-sized organelles, melanosomes, in the integument, eyes and internal tissues and functions in photoprotection, visual signaling, thermoregulation, immunity, antioxidation, mechanical strengthening, and abrasion resistance [6,10,11] (Figure 1, Box 1). It is unclear which functions evolved first and which selection pressures dominate [11,12]. Fossils preserving evidence of melanin offer a unique temporal perspective. Melanin has been reported from fossil vertebrates from >25 localities from the Carboniferous to the Pliocene (Table S1 in the supplemental information online). The fossils include cyclostomes, fish, frogs, lizards, and other squamates, ichthyosaurs, plesiosaurs, turtles, pterosaurs, feathered and nonfeathered dinosaurs, birds, and mammals. This phylogenetically and temporally broad dataset yields evidence for ancient functions of melanin (Figure 2). Highlights In extant vertebrates melanin fulfils diverse roles including visual communication, photoprotection, antioxidation, and mechanical strengthening of tissues, but the evolution of these functions is debated. The discovery that melanosomes in fossil and modern ve...