This paper examines the impact of the 2018 US tariff escalation on firm profitability and investigates whether artificial intelligence (AI) adoption enhanced firms' resilience to tariff-induced shocks. Using a difference-in-differences framework, we compare firms importing intermediate inputs with those importing final consumption goods to identify the causal effect of tariffs on profitability. We construct a firm-level measure of AI adoption from textual analysis of SEC 10-K filings, capturing firms' investments in and use of AI technologies. We then estimate a triple-difference model to assess whether AI-adopting firms were better able to withstand the adverse effects of tariffs. The results show that the 2018 tariff shock significantly reduced the profitability of intermediate-input importers relative to firms importing final goods. However, AI adoption partially offset these losses, with AI-intensive firms experiencing a significantly smaller decline in profitability. These findings suggest that AI can strengthen firms' resilience to trade policy shocks, although it cannot fully eliminate their adverse effects.