Anaerobic digestion (AD) represents a mature and extensively adopted technique to dispose organic waste, yet ammonia toxicity remains a major bottleneck for stable AD operation. For activating methanogenesis-related enzymes, regulating the microbial community structure, and optimizing the reaction efficiency of AD process, supplementation of trace elements has been validated as an effective approach to counteract ammonia inhibition. However, mechanisms of how different trace elements modulate the biosynthesis and release of N-acyl homoserine lactones (AHLs), as well as the subsequent relieving ammonia inhibition are still unknown. Therefore, the current study investigated the effects of different trace elements on the secretion of AHLs under ammonia stress. The results showed that optimal concentrations of Fe, Co and Ni could enhance the secretion of AHLs, mainly N- butyrylDL-homoserine lactone (C4-HSL) and N-hexanoylL-homoserine lactone (C6-HSL), and adjust microbial social behaviors under high ammonia levels. In addition, microbial community changes (enriched Bacteroidetes_vadinHA17, Syntrophomonas and Methanosarcina) were closely associated with increased methane production and stimulated AHLs accumulation by trace elements. Furthermore, increased AHLs signals correlated with intercellular communication could regulate critical genes transcription (glk, pgk, and yhdR) and enzymes synthesis (glucokinase, acetate kinase, and Coenzyme-B sulfoethylthiotransferase) to alleviate ammonia inhibition during the whole AD process. Trace elements could serve for multiple enzymes, which could be beneficial for AHL secreting hydrolytic-acidogenic consortia. The current study could provide primary insights for applying trace elements to relieve ammonia stress via AHLs regulation.