Climate change has been projected to cause increased temperature and amplified inflows of terrestrial organic matter to coastal areas in northern Europe. Consequently, changes at the base of the food web favoring heterotrophic bacteria over phytoplankton are expected, affecting the food web structure. We tested this hypothesis using an outdoor shallow mesocosm system in the northern Baltic Sea in early summer, where the effects of increased temperature (+ 3°C) and terrestrial matter inputs were studied following the system dynamics and conducting grazing experiments. Juvenile perch constituted the highest trophic level in the system, which exerted strong predation on the zooplankton community. Perch subsequently released the microbial food web from heavy grazing by mesozooplankton. Addition of terrestrial matter had a stronger effect on the microbial food web than the temperature increase, because terrestrial organic matter and accompanying nutrients promoted both heterotrophic bacterial production and phytoplankton primary production. Moreover, due to the shallow water column in the experiment, terrestrial matter addition did not reduce the light below the photosynthesis saturation level, and in these conditions, the net-autotrophy was strengthened by terrestrial matter enrichment. In combination with elevated temperature, the terrestrial matter addition effects were intensified, further shifting the size distribution of the microbial food web base from picoplankton to microphytoplankton. These changes up the food web led to increase in the biomass and proportion of large-sized ciliates (>60 µm) and rotifers. Despite the shifts in the microbial food web size structure, grazing experiments suggested that the pathway from picoplankton to nano- and microzooplankton constituted the major energy flow in all treatments. The study implies that the microbial food web compartments in shallow coastal waters will adjust to climate induced increased inputs of terrestrial matter and elevated temperature, and that the major energy path will flow from picoplankton to large-sized ciliates during the summer period.