According to the weight design problem of discrete Hopfield neural network(DHNN), an improved learning algorithm for weight design is proposed. On the basis of the dynamic analysis for DHNN, the learning algorithm is designed. The orthogonal matrix is got by using the method of matrix decomposition(MD), and the orthogonal matrix is used to get the weight matrix of DHNN directly. The weight matrix which is obtained by the learning algorithm can store information well, so that the testing sample can converge to a stable point. The learning algorithm does not need block calculation. The calculation steps, the amount of calculation and the number of iterations are reduced, so the operating speed of the network is improved. Finally, the algorithm is applied to water quality evaluation to prove its effectiveness and feasibility.