Dietary supplementation with seaweeds has the potential to improve the immune response and physiological performance of marine shrimp under stressful conditions. This work evaluated the effect of dietary supplementation using different ratios of the brown seaweeds Sargassum filipendula (S) and Undaria pinnatifida (U) on the gut microbiota as well as on the resistance to thermal shock and White Spot Syndrome Virus (WSSV) of Litopenaeus vannamei. Additionally, hemocyte lipid and protein profiles were determined by mass spectrometry (MALDI-TOF MS), before and after each stress condition. Shrimp were fed diet containing different seaweed combinations (S%:U% ratios included 0.5S:1U, 0.5S:2U and 0.5S:4U) for 15 days before the metagenomic and thermal shock assessments, and for 21 days before the viral challenge. Following the feeding trial, shrimp were subjected to thermal shock (28.6 °C to 11.5 °C for 1 h, and then back to 28 °C) or were experimentally infected with WSSV. Cumulative mortality was monitored during 24 and 96 h after thermal shock and WSSV challenge, respectively. Hemocyte sampling for MALDI-TOF MS was performed before and 15 min after thermal shock, as well as before and 24 h after viral infection. The dietary supplementation with combinations of brown seaweeds conferred protection against WSSV, but not against the thermal shock. Mortality rates of animals fed 0.5S:2U and 0.5S:4U diets were substantially lower (28.1 and 31.3%, respectively) than the control untreated group (78.1%) at 96 h after WSSV challenge. Thermal shock caused pronounced changes in hemocyte lipid and protein profiles, regardless of the diet, particularly affecting molecules involved in membrane fluidity, lipid and energy metabolism, immune response, apoptosis and antioxidant capacity. Hemocyte molecular content of WSSV-infected animals was different from that of the control group, showing shifts in particular lipid and protein groups that could be potentially associated with the early induction of apoptosis as well as the modulation of lipid metabolism and antimicrobial compounds. Metagenomic analysis revealed that the increasing levels of U. pinnatifida in the diet reduced shrimp gut microbial richness, while enhanced microbial diversity, especially in 0.5S:1U and 0.5S:2U treatments. Such response was mainly related to changes in the relative abundances of the families Rhodobacteraceae, Flavobacteriaceae and Cellulomadaceae. In conclusion, our findings indicate that feeding shrimp diets containing a mixture of both seaweeds affect their gut microbiota and could potentially reduce mortality rates during WSSV outbreaks, triggering intracellular and physiological mechanisms that could also ameliorate the deleterious impacts of other environmental stressors.