During the Eocene, shallow-water carbonate systems were significantly impacted by climate fluctuations and hyperthermal events. Following the peak temperatures of the Early Eocene Climatic Optimum (EECO), a general cooling trend began, with short-lived (⁓200 kyr) warming events occurring alongside it. In the early Bartonian (around 40.1 Ma), a warming event known as the Middle Eocene Climatic Optimum (MECO) occurred, lasting approximately 500,000 years. In this scenario, the types and calcification rates of marine organisms such as corals and larger benthic foraminifera (LBF) were influenced by global CO2 and oceanographic changes, which had a major effect on photic carbonate factories. To better understand the effects of these factors on carbonate factories, a detailed study of shallow-water facies types, distributions, and evolution was conducted. The Middle Eocene Monte Saraceno sequence, located on the eastern margin of the Apulia Carbonate Platform (Gargano Promontory, southern Italy), was selected as a case study to investigate the relationships between carbonate factory types and climatic changes around the MECO event. This study identified two distinct intervals with different modes of carbonate production, separated by a sharp boundary. The lower interval consists of clinostratified, thick beds of rudstone to floatstone, mostly made up of various large Nummulites tests, indicating an early Bartonian age (Shallow Benthic Zone 17). Instead, the upper interval consists of coral floatstone to rudstone with a packstone matrix, rich in branching corals in association with gastropods, bivalves, and rare small larger benthic foraminifera. The appearance of Heterostegina sp. and Glomalveolina ungaroi in this interval indicates a late Bartonian age (Shallow Benthic Zone 18). By integrating biostratigraphic and stable-isotope data, the lower interval, with abundant Nummulites, was linked to the MECO event, during which higher sea-surface temperatures seem to enhance larger benthic foraminifera proliferation, as already occurred in the Early Eocene. However, in the late Bartonian, the sharp transition to a coral-dominated carbonate factory, with rare larger benthic foraminifera showing smaller sizes, could be attributed to a drop in temperature that created the conditions more favourable to corals. Overall, this study provides compelling evidence of how environmental changes can affect marine carbonate production, also highlighting the importance of investigating these relationships, to better understand climate change in the past, present and near future.