To enhance the accuracy of fault location in microgrid lines, a fault location method based on adaptive variational mode decomposition (AVMD) and double-ended traveling wave ranging is proposed. Firstly, a microgrid radial structure model, incorporating wind, light, and water systems, is established. The parameters of variational mode decomposition are optimized by using the Aquila optimizer (AO) algorithm, allowing the original fault signal to be decomposed into multiple modal components using AVMD. Only a limited number of modal components retain the fault signal information. The effective weighted peak relevance index (EWPR) is employed to select the sensitive modal components, identified as the four modes that best preserve the fault information, for signal reconstruction. Finally, the reconstructed signal is applied for fault localization. Simulation results indicate that the proposed method is scarcely influenced by the fault type, exhibiting superior accuracy compared to the single-ended traveling wave method.