In this paper we study an SLIR epidemic model with nonmonotonic incidence rate, which describes the psychological effect of certain serious diseases on the community when the number of infectives is getting larger. By carrying out a global analysis of the model and studying the stability of the disease-free equilibrium and the endemic equilibrium, we show that either the number of infective individuals tends to zero or the disease persists as time evolves. For the stochastic model, we prove the existence, uniqueness and positivity of the solution of the model. Then, we investigate the stabilit...