We present a chaotic hash function based on the dynamic S-Box with variable parameters in this paper. More specifically, we first exploit the piecewise linear chaotic map to obtain four initial buffers and an initial hash value. Then, we divide a randomly chosen message into message blocks and assign the four buffers and current message block to a transfer function to produce variable parameters and initial values of the PWLCM and logistic map for constructing a dynamic S-Box, which is then used for updating the four buffers. After all the message blocks are processed, the final hash value is generated by cascading the buffers and then applying XOR operation with the last hash value. Finally, we conduct performance evaluation on the proposed hash algorithm in terms of sensitivity, confusion and diffusion properties, collision resistances, speed analysis, randomness tests, and comparison with other algorithms, and the results demonstrate that the proposed algorithm has good statistical properties, strong collision resistances and better performance compared with other schemes.