Mg-based alloys might be ideal biomaterials in clinical applications owing to favorable mechanical properties, biodegradability, biocompatibility, and especially their anti-inflammatory properties. However, the precise signaling mechanism underlying the inhibition of inflammation by Mg-based alloys has not been elucidated. Here, we investigated the effects of a Mg-2.1Nd-0.2Zn-0.5Zr alloy (denoted as JDBM) on lipopolysaccharide (LPS)-induced macrophages. THP-1 cell-derived macrophages were cultured on JDBM, Ti−6Al−4V alloy (Ti), 15% extract of JDBM, and 7.5 mM of MgCl2 for 1 h before the addition of LPS for an indicated time; the experiments included negative and positive controls. Our results showed JDBM, extract, and MgCl2 could decrease LPS-induced tumor necrosis factor (TNF) and interleukin (IL)-6 expression. However, there were no morphologic changes in macrophages on Ti or JDBM. Mechanically, extract and MgCl2 downregulated the expression of toll-like receptor (TLR)-4 and MYD88 compared with the positive control and inhibited LPS-induced nuclear factor-kappa B (NF-κB) and mitogen-activated protein kinase (MAPK) signaling pathways by inactivation of the phosphorylation of IKK-α/β, IKβ-α, P65, P38, and JNK. Additionally, the LPS-induced reactive oxygen species (ROS) expression was also decreased by extract and MgCl2. Interestingly, the expression of LPS-induced TNF and IL-6 could be recovered by knocking down TRPM7 of macrophages, in the presence of extract or MgCl2. Mechanically, the activities of AKT and AKT1 were increased by extract or MgCl2 with LPS and were blocked by a PI3K inhibitor, whereas siRNA TRPM7 inhibited only AKT1. Together, our results demonstrated the degradation products of Mg-based alloy, especially magnesium, and resolved inflammation by activation of the TRPM7–PI3K–AKT1 signaling pathway, which may be a potential advantage or target to promote biodegradable Mg-based alloy applications.