Objective: Walking is one of the most complex human movements that can be affected by various sources of attention. Dual tasks reduce attention, increase information processing, and may alter control mechanisms such as synergy. However, the effect of dual tasks on muscle synergy remains unknown. Therefore, this study aimed to investigate the effect of cognitive and motor dual tasks on the synergy of lower limb muscles during walking. Methods: Twenty-four participants were selected voluntarily. The activity of the eight lower limb muscles was recorded under three different conditions: normal walking without a dual task, walking with a cognitive dual task, and walking with a motor dual task. A nonnegative matrix factorization algorithm and the variance accounted for were used to extract muscle synergy. The repeated-measures analysis of variance test and Pearson’s correlation coefficient were performed to analyze the data. Results: In this study, five muscle synergies were extracted from electromyography data using the variance accounted for method under three different conditions. The pattern of muscle synergies showed moderate to strong correlations. Peaks of synergies changed, and a time shift in synergy peaks during walking was observed. However, the number of extracted synergies did not change. Conclusion: The number of recruited muscle synergies remained consistent across different conditions. Dual tasks affect the higher levels of the motor control system, causing interference in information processing that leads to a shift in the tendency of synergy and weight coefficients of the muscles, ultimately resulting in a change in walking mechanics.