Block ciphers are a crucial type of cryptographic algorithm being used to ensure information security for many applications today. However, there are numerous potential active attacks on block ciphers, so the research and design of dynamic block ciphers to advance the security of block ciphers is a matter of concern today. Maximum distance separable (MDS) matrices are a crucial component of many block ciphers. Involutory MDS matrices are primarily selected because using an involutory matrix allows for both encryption and decryption operations to be performed using the identical circuitry, resulting in an equal implementation cost for both processes. In this article, we propose algorithms to generate 4 x 4 and 8 x 8 Hadamard involutory MDS matrices based on column and row permutations. Next, we propose an algorithm to create key-dependent involutory MDS matrices based on column and row permutation, scalar multiplication, and direct exponentiation. Then, we experimentally strengthen the dynamic AES block cipher based on the proposed algorithm, conduct security analysis, and evaluate the NIST statistical criteria for AES and the dynamic AES algorithm. The outcomes of our research could potentially enhance the robustness of the AES block cipher against numerous contemporary powerful attacks.