We successfully prepared mercury sulphide nanoparticle hydrogels by physical encapsulation method. The successfully prepared mercuric sulphide nanoparticle hydrogel was a zinc folate hydrogel, which showed an obvious porous structure with interconnected and uniformly distributed pores and a pore size range of about 20 μm. The maximum drug loading of the hydrogels was 3%, and the cumulative release degree was in accordance with the first-order kinetic equation Mt = 149.529 (1 – e). The particles in mercuric sulphide nanoparticle hydrogels significantly down-regulated the expression of the cell surface co-stimulatory molecule CD86 ( < .0001). Meanwhile, the inflammatory response was regulated through the NF-κB pathway in LPS-induced inflammatory cells. Later, it was observed that mercuric sulphide nanoparticle hydrogels could significantly counteract the inflammatory and immune models through a mouse ear swelling model, a rat foot-plantar swelling model and a rheumatoid arthritis model. This design targets the immunomodulatory, and anti-inflammatory effects through nanocomposite hydrogel technology. It reduces the drawbacks of low mercury utilisation and susceptibility to accumulation of toxicity. It aims to provide an experimental basis for the development of mercuric sulphide and the treatment of inflammatory and immune-related diseases. HighlightsMercury sulphide nanoparticle hydrogel has an optimal mercury sulphide nanoparticle content of 2%, is structurally homogeneous and stable, and does not exhibit significant liver or kidney toxicity.Mercuric sulphide nanoparticle hydrogel exerts anti-inflammatory effects in cells and rats, and regulates the expression of macrophage surface molecules and factors related to the NF-κB pathway.Mercuric sulphide nanoparticle hydrogel improves the condition of ankle synovial joints in a rat model of rheumatoid arthritis.