In this paper, using the neural network with self-feedback, we introduce a method to solve constraint satisfaction problem. In this method, all the restriction conditions of a constraint satisfaction problem are divided into two restrictions: restriction I and restriction II. The optimum solution can be obtained when the values of energy of both the restriction become 0 at the same time. Simulation results on its application to the classic four-coloring problem illustrate its effectivity and practicality.