With the increasing awareness of privacy protection, people pay more and more attention to strengthening the security of image data transmitted over the network. Therefore, this paper designs a chaotic image encrypting algorithm based on dynamic Hachimoji DNA coding and computing to protect images. The Hachimoji DNA coding method provides richer coding rules to dynamically encode images than the traditional DNA coding method, improving the complexity and security of the encryption algorithm. First, the original image is rearranged and encoded with the dynamic Hachimoji DNA coding method according to the sorting and encoding controller sequence generated by a six-dimensional hyperchaotic system. Second, various DNA operations are performed on the encoded image. Among these operations, we not only use the common operations but also propose a new DNA operation called bitwise inversion. Finally, the DNA image is decoded using the dynamic decoding method to obtain the encrypted image. Experiments demonstrated that the image encryption algorithm has a good security effect and can effectively resist common attacks.