The Hopfield neural network has been widely applied in many areas. Is highly interconnected structure of neurons is not only very effective in computational complexity but also very fault tolerant. Such neural networks have been used as analog computational networks for solving optimization problems. The low-level image processing of edge detection can also be regarded as an optimization problem. This paper presents an edge detection algorithm using a Hopfield neural network. This algorithm utilizes a concept that is different from conventional differentiation operators, such as the Sobel and Laplacian. In this algorithm, an image is mapped to a Hopfield neural network, which is completely depicted by an energy function. In other words, an image is described by a set of interconnected neurons. Every pixel in the image is represented by a neuron, which is connected to all other neurons but not to itself. The weight of connection between two neurons is described as a function of the contrast of gray-level values and the distance between the two pixels. The initial state of each neuron represents the normalized gray-level value of the corresponding pixel in the original image. As a result of Hopfield-network analysis, neuron states are modified till convergence. Even though the neuron states are analog, they are close to 1.0 in all regions except edges, where the corresponding neurons have near-0.0 state values. A robust threshold on the output level of the converged network can be easily set up at 0.5 to extract edges.