Galaxy clusters are the most massive gravitationally bound structures in the Universe, comprising thousands of galaxies and pervaded by a diffuse, hot intracluster medium (ICM) that dominates the baryonic content of these systems. The formation and evolution of the ICM across cosmic time1 is thought to be driven by the continuous accretion of matter from the large-scale filamentary surroundings and energetic merger events with other clusters or groups. Until now, however, direct observations of the intracluster gas have been limited only to mature clusters in the later three-quarters of the history of the Universe, and we have been lacking a direct view of the hot, thermalized cluster atmosphere at the epoch when the first massive clusters formed. Here we report the detection (about 6σ) of the thermal Sunyaev-Zeldovich (SZ) effect2 in the direction of a protocluster. In fact, the SZ signal reveals the ICM thermal energy in a way that is insensitive to cosmological dimming, making it ideal for tracing the thermal history of cosmic structures3. This result indicates the presence of a nascent ICM within the Spiderweb protocluster at redshift z = 2.156, around 10 billion years ago. The amplitude and morphology of the detected signal show that the SZ effect from the protocluster is lower than expected from dynamical considerations and comparable with that of lower-redshift group-scale systems, consistent with expectations for a dynamically active progenitor of a local galaxy cluster.