Animals' survival is dependent on their abilities to adapt to the changing environment by adjusting their behaviours, which is related to the ubiquitous learning behaviour, nonassociative learning. Thus mimicking the indispensable learning behaviour in organisms based on electronic devices is vital to better achieve artificial neural networks and neuromorphic computing. Here a three terminal device consisting of an oxide-based memristor and a NMOS transistor is proposed. The memristor with gradual conductance tuning inherently functions as the synapse between sensor neurons and motor neurons and presents adjustable synaptic plasticity, while the NMOS transistor attached to the memristor is utilized to mimic the modulatory effect of the neuromodulator released by inter neurons. Such a memristor-based multi-terminal device allows the practical implementation of significant nonassociative learning based on a single electronic device. In this study, the experience-induced modification behaviour, both habituation and sensitization, was successfully achieved. The dependence of the nonassociative behavioural response on the strength and interval of presented stimuli was also discussed. The implementation of nonassociative learning offers feasible and experimental advantages for further study on neuromorphic systems based on electronic devices.