The signaling adaptor MAVS forms prion-like aggregates to activate an innate antiviral immune response after viral infection. However, the molecular mechanisms that regulate MAVS aggregation are poorly understood. Here we identified TRIM31, an E3 ubiquitin ligase of the TRIM family of proteins, as a regulator of MAVS aggregation. TRIM31 was recruited to mitochondria after viral infection and specifically regulated antiviral signaling mediated by RLR pattern-recognition receptors. TRIM31-deficient mice were more susceptible to infection with RNA virus than were wild-type mice. TRIM31 interacted with MAVS and catalyzed the Lys63 (K63)-linked polyubiquitination of Lys10, Lys311 and Lys461 on MAVS. This modification promoted the formation of prion-like aggregates of MAVS after viral infection. Our findings reveal new insights in the molecular regulation of MAVS aggregation and the cellular antiviral response through TRIM31-mediated K63-linked polyubiquitination of MAVS.