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 in vitro cumulative release degree was in accordance with the first-order kinetic equation Mt = 149.529 (1 − e−0.026t). The particles in mercuric sulphide nanoparticle hydrogels significantly down-regulated the expression of the cell surface co-stimulatory molecule CD86 (p < .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.