While previous studies have primarily spotlighted the negative consequences of CEO experience accumulation in mergers and acquisitions (M&A) such as overconfidence and narcissism, cognitive characteristics that allow CEOs to benefit from their growing M&A experience are unknown. We draw from behavioral strategy and cognitive psychology research to introduce CEO ambivalent cognition as such an enabling factor. Ambivalent cognition refers to a thinking style that favors positive and negative evaluations (valences) simultaneously. We hypothesize that CEO ambivalent cognition moderates the relationship between CEO M&A experience and M&A performance. CEOs exhibiting ambivalent cognition are more likely to identify strengths and weaknesses in prior acquisitions, which improves learning from M&A experience. A novel and transparent machine-learning-based approach enables us to measure CEO valences in a dataset of 2.6 million sentences. We find robust support for our hypothesis based on an analysis of 6,172 transactions of S&P 500 firms. Our study contributes to behavioral strategy research by advancing the cognitive perspective on how CEOs learn from the causally ambiguous performance feedback of acquisitions.