Neural state machines (NSMs) with weight tunable synapses and leaky integrate-and-fire neurons can control the workflow according to the input information and current state, which has attracted increasing attention in handling complex control logic for various applications. The emerging memristor crossbar network provides an opportunity to further develop NSMs due to the unique analog properties, high density, low-power consumption, and high scalability. However, memristors exhibit nonideal features, such as variation, nonlinearity, and asymmetry of the conductance update, which may hinder the implementation of memristors in NSMs. In this paper, we investigate the implementation of a memristor in an NSM and demonstrate a fully memristor neural state machine (MNSM). Nonvolatile and volatile memristors are designed to emulate the synaptic and neuronal behaviors in MNSMs, respectively. Through a map search task, the MNSM not only exhibits strong robustness to the substantial nonideal behaviors of memristors but also benefits from these shortcomings, showing a faster convergence in the training process. This work proves the feasibility of applying memristors in NSMs and the great potential of MNSMs in handling complex control logic, which promotes the further development of NSMs for neuromorphic computing systems.