21st century is considered as the era of communication, and Wireless Sensor Networks (WSN) have assumed an extremely essential job in the correspondence period. A wireless sensor network is defined as a homogeneous or heterogeneous system contains a large number of sensors, namely called nodes used to monitor different environments in cooperatives. WSN is composed of sensor nodes (S.N.), base stations (B.S.), and cluster head (C.H.). The popularity of wireless sensor networks has been increased day by day exponentially because of its wide scope of utilizations. The applications of wireless sensor networks are air traffic control, healthcare systems, home services, military services, industrial & building automation, network communications, VAN, etc. Thus the wide range of applications attracts attackers. To secure from different types of attacks, mainly intruder, intrusion detection based on dynamic state context and hierarchical trust in WSNs (IDSHT) is proposed. The trust evaluation is carried out in hierarchical way. The trust of sensor nodes is evaluated by cluster head (C.H.), whereas the trust of the cluster head is evaluated by a neighbor cluster head or base station. Hence the content trust, honest trust, and interactive trust are put forward by combining direct evaluation and feedback based evaluation in the fixed hop range. In this way, the complexity of trust management is carried in a hierarchical manner, and trust evaluation overhead is minimized.