This study aims to solve the problem of small key space in image cryptosystems based on logistic mapping. First, a new one-dimensional (1D) chaotic system, with a wide continuous chaotic interval, a large Lyapunov exponent and obvious chaotic characteristics are presented. Subsequently, a novel image encryption algorithm based on the new 1D chaotic system and dynamic DNA encoding is designed. Compared with other DNA coding methods, the proposed image encryption algorithm encodes chaotic sequences and ensures that the sequence elements at different positions correspond to different DNA coding schemes. This will help to overcome the fixity of DNA coding and make the proposed dynamic DNA coding easy to operate and implement. Finally, the cipher image is obtained by scrambling and bit XOR operation based on the chaotic sequences. The fixed DNA coding method is compared with other chaotic image encryption schemes, and the experimental results indicate that the image encryption algorithm has higher security and can resist common attacks.