In recent years, intrusion detection in mobile ad hoc network has become a topic of research. Due to problems like limited battery power, limited bandwidth and dynamic topology environment, it's very difficult to implement security measures for MANET (Mobile Ad hoc NETwork). Routing protocols can play vital role in secure communication and intrusion detection. Particle swarm optimization is the bio-inspired approach based on swarm intelligence invented by the researchers in 1995. A cooperative, distributed and low cost intrusion detection system can be built using PSO to prevent dynamic intrusive attacks in MANET.