An image encryption algorithm is proposed in this paper based on a new four-dimensional hyperchaotic system, a neural mechanism, a Galois field and an improved Feistel block structure, which improves the efficiency and enhances the security of the encryption algorithm. Firstly, a four-dimensional hyperchaotic system with a large key space and chaotic dynamics performance is proposed and combined with a cloud model, in which a more complex and random sequence is constructed as the key stream, and the problem of chaotic periodicity is solved. Then, the key stream is combined with the neural mechanism, Galois field and improved Feistel block structure to scramble and diffuse the image encryption. Finally, the experimental results and security analysis show that the encryption algorithm has a good encryption effect and high encryption efficiency, is secure, and can meet the requirements of practical applications.