Background: In addition to rotavirus and norovirus, human adenovirus (HAdV) and classic human astrovirus (classic HAstV) have been identified as important pathogens of acute diarrhea in infants and young children. Here, we presented the molecular epidemiology of HAdV and classic HAstV in children with acute diarrhea in Shanghai. Methods: Fecal specimens were collected from 804 outpatient infants and young children diagnosed as acute diarrhea in Shanghai from January 2017 to December 2018. All the samples were screened for the presence of HAdV and classic HAstV. HAdV and Classic HAstV were detected using traditional PCR and reverse-transcription PCR, respectively. All the HAdV and classic HAstV positive samples were genotyped by phylogenetic analysis. Results: Among these 804 fecal samples, 8.58% (69/804) samples were infected with at least one of HAdV or classic HAstV, and one of them was co-infected with these two viruses. The overall detection rates of HAdV and classic HAstV were 3.47% (28/804) and 5.22% (42/804), respectively. Four subgroups (A, B, C and F) of HAdV were detected and seven different genotypes (HAdV-C1, -C2, -B3, -C5, -A31, -F40 and -F41) were identified. Subgroup F had the highest constituent ratio at 64.29% (18/28) followed by non-enteric HAdV of subgroup C (21.43%, 6/28) and subgroup B 10.71% (3/28). HAdV-F41 (60.71%, 17/28) was the dominant genotype, followed by HAdV-C2 (14.29%, 4/28) and HAdV-B3 (10.71%, 3/28). Two different genotypes of classic HAstV (HAstV-1 and HAstV-5) were identified in 42 samples during the study period. HAstV-1 (95.24%, 40/42) was the predominant genotype and the other two strains were genotyped as HAstV-5. Conclusions: Those findings indicate that HAdV and classic HAstV play an important role in the pathogenesis of acute diarrhea in children in Shanghai. Systematic and long-term surveillance of HAdV and classic HAstV are needed to monitor their prevalence in children and prevent major outbreak.