Mobile ad hoc networks (MANETs) nodes interchange information by means of numerous intermediate nodes without the requirement of infrastructure (Toh, Ad hoc mobile wireless networks: protocols and systems, pp 34–37, 2002). Owing to the exposed arrangement and inadequate energy of the nodes, some nodes may not involve in the routing process properly (Laay et al., IEEE Commun Surv Tutor 10(4):78–93, 2008). This leads to selfish behavior of the nodes and moreover, some nodes do not have the chance to forward the packets, so they still idle in the network. Hence, these genuine idle nodes are also considered as selfish nodes and they are avoided in the routing process. To address this issue, credit-based protocols namely Neighbor credit value based and improved Neighbor credit value based Ad Hoc on demand distance vector (AODV) routing algorithms are proposed. These two protocols are evaluated against AODV for the better detection of selfish node behavior. Earlier works addressed the methods to overwhelm selfish behavior attack but fail in performance. A simple neighbor credit value based AODV (NCV-AODV) routing protocol was proposed to avoid such false detection. Some simple assumption is made on NCV-AODV that the nodes in the network are fundamentally not malicious and only some of the new nodes may be added to behave maliciously. This improved version is called improved Neighbor credit value based AODV (iNCV-AODV) protocol is proposed. The proposed two mechanisms are implemented in AODV routing protocol. An extensive analysis of the performance of the proposed detection mechanisms against the selfish behavior attack.