© 2017 American Physical Society. Heavy-fermion systems share some of the strange metal phenomenology seen in other unconventional superconductors, providing a unique opportunity to set strange metals in a broader context. Central to understanding heavy-fermion systems is the interplay of localization and itinerancy. These materials acquire high electronic masses and a concomitant Fermi volume increase as the f electrons delocalize at low temperatures. However, despite the wide-spread acceptance of this view, a direct microscopic verification has been lacking. Here we report high-resolution angle-resolved photoemission measurements on CeCoIn5, a prototypical heavy-fermion compound, which spectroscopically resolve the development of band hybridization and the Fermi surface expansion over a wide temperature region. Unexpectedly, the localized-to-itinerant transition occurs at surprisingly high temperatures, yet f electrons are still largely localized even at the lowest temperature. These findings point to an unanticipated role played by crystal-field excitations in the strange metal behavior of CeCoIn5. Our results offer a comprehensive experimental picture of the heavy-fermion formation, setting the stage for understanding the emergent properties, including unconventional superconductivity, in this and related materials.