Decoded with the extended min-sum (EMS) algorithm, q-ary LDPC codes suffer great performance degradation compared with that decoded with the q-ary sum-product algorithm (QSPA) in case the length nm of message vectors is too small. To solve this problem, a dynamic EMS (D-EMS) algorithm is proposed in this paper. First, we examined the distribution of likelihood values among GF(q) symbols in the message vectors, and concluded that the likelihood values would concentrate to a small portion of symbols as the iteration number increases. Therefore, the D-EMS algorithm first set the length of message vectors to nm1, then truncate it to nm2 after certain decoding iterations, thus the decoding computational complexity can be efficiently reduced. Meanwhile, in order to reduce the complexity of real comparisons in the decoder, the proposed algorithm employs the bubble check (BC) algorithm during the check node elementary steps. Complexity analysis and simulation results indicate that, under appropriate parameter configurations, while efficiently reducing the decoding complexity of the EMS algorithm, the D-EMS algorithm performs nearly as well as the corresponding EMS algorithm over both AWGN and Rayleigh fading channels, and thus can be efficiently applied to practical communication systems based on q-ary LDPC codes.