Human cytomegalovirus (HCMV) is the leading cause of congenital infection and an opportunistic pathogen capable of establishing lifelong latency. In the present study, we aimed to investigate the distribution of glycoprotein B, H, and N in infants of Shanghai and correlate the genotype with active and latent HCMV infection. A total of 129 urine samples were collected between August 2014 and December 2015 from infants under 3 years with HCMV infection. Nested PCR was used to amplify the regions of UL55 (gB), UL75 (gH), and UL73 (gN). Gene sequencing and phylogenetic analyses were used to classify the genotypes. Overall, regarding gB, gB1 (57.27%) was predominant, followed by gB3 (41.82%) and gB4 (0.91%). gH1 (54.33%) was the most prevalent genotype of gH, followed by gH2 (45.67%). Concerning gN, we detected gN1 (17.44%), gN2 (2.33%), gN3a (29.07%), gN3b (8.14%), gN4a (13.95%), gN4b (15.12%), and gN4c (13.95%), among which gN3a was the dominant genotype. All the expected genotypes were present except gB2 in children with active infection: gB1 (56.25%), gB3 (42.5%), gB4 (1.25%), gH1 (58.70%), gH2 (41.30%), gN1 (19.05%), gN2 (3.17%), gN3a (25.40%), gN3b (6.35%), gN4a (15.87%), gN4b (17.46%), and gN4c (12.70%). However, among latent cases, we detected gB1 (60%), gB3 (40%), gH1 (42.86%), gH2 (57.14%), gN1 (13.04%), gN3a (39.13%), gN3b (13.04%), gN4a (8.70%), gN4b (8.70%), and gN4c (17.39%), respectively. gB2, gB4, and gN2 were absent in this group. The results revealed that gB1, gH1, and gN3a were predominant in the infants of Shanghai. gH showed different trends among children with active and latent infection.