By analyzing the energy–momentum relationship of the absorbed fermions dropping into a Reissner–Nordstöm–anti-de Sitter black hole surrounded by dark matter, the laws of thermodynamic and weak cosmic censorship conjecture in the extended phase space are investigated. We find that the first law of thermodynamics is valid. However, the validity of the second law of thermodynamics depends on the density [Formula: see text] of the perfect fluid dark matter. In addition, we also find that when the fermions are absorbed, the structures of black hole surrounded by dark matter would not change. Therefore, weak cosmic censorship conjecture holds for the extreme black holes and the non-extreme black holes.