As the birthplace of national culture, traditional villages can convey cultural and social natures through spatial configuration. Based on the theory of spatial syntax, this paper combines the genetic algorithm to design the fitness function for optimization, and selects the streets and lanes of Wengji Village as the research sample, focusing on the analysis of its morphological evolution mechanism from 1975 to 2020. Through quantitative analysis, it is found that although the streets and alleys of Wengji Village show spatial scale expansion due to social and economic development, the village streets and alleys can still maintain the original spatial texture and style. The integration degree, selectability, synergy (0.4273~0.6395) and comprehensibility (0.3744~0.5761) of the streets and alleys in Wengji Village are all characterized by increasing, indicating that the spatial accessibility, spatial openness and spatial wholeness of the streets and alleys in Wengji Village have been improved. However, the degree of synergy and comprehensibility are still lower than 0.7, and there is some room for optimization of the wholeness and cognizability of the streets and lanes of Wengji Village. It is necessary to protect and continue the overall structure of the village, optimize and integrate the key spaces of the village, and rationally control the development process of the village, so as to promote the protection of the spatial form of the streets and lanes of Wengji Village and the continuation of the cultural lineage.