To explore the evolutionary dynamics and molecular transmission patterns of HIV-1 CRF01-AE in depth among men who have sex with men (MSM) in Shanghai, we constructed phylogenetic tree and genetic transmission networks based on 1, 152 pol sequences from MSM, 282 from other risk groups and 795 references. Phylogenetic analyses identified two distinct major CRF01-AE lineages and a Shanghai-based sub-lineage. The estimated tMRCAs for lineage 1 and 2 were 1996.0 (1992.9-1999.2) and 1997.8 (1994.3-2001.4), respectively. Of the 1, 152 MSM, 681 (59.1%) were identified as belonging to 241 separate networks. Of these 681 individuals in networks, 74.2% were linked to cases diagnosed in different years, 4.3% were linked to heterosexual women, and 0.7% were linked to persons who inject drugs. A total of 71 networks including 180 individuals diagnosed in Shanghai with the same domicile were found. Recent infection (P = 0.022) and sampling year after 2011 (P < 0.001) were significantly associated with potential transmission links among the networks. Besides, a significant transmission of viruses with drug resistant mutations at V179D/E were found in the networks. Given these findings, we propose that genetic transmission analysis is a useful tool in HIV intervention strategies to curb the spread of virus and promoting public health.