Mosquitoes harbour a diversity of viruses and are responsible for several mosquito‐borne viral diseases of humans and animals, thereby leading to major public health concerns, and significant economic losses across the globe. Viral metagenomics offers a great opportunity for bulk analysis of viral genomes retrieved directly from environmental samples. In this study, we performed a viral metagenomic analysis of five pools of mosquitoes belonging to Aedes, Anopheles and Culex species, collected from different pig farms in the vicinity of Shanghai, China, to explore the viral community carried by mosquitoes. The resulting metagenomic data revealed that viral community in the mosquitoes was highly diverse and varied in abundance among pig farms, which comprised of more than 48 viral taxonomic families, specific to vertebrates, invertebrates, plants, fungi, bacteria and protozoa. In addition, a considerable number of viral reads were related to viruses that are not classified by host. The read sequences related to animal viruses included parvoviruses, anelloviruses, circoviruses, flavivirus, rhabdovirus and seadornaviruses, which might be taken up by mosquitoes from viremic animal hosts during blood feeding. Notably, sample G1 contained the most abundant sequence related to Banna virus, which is of public health interest because it causes encephalitis in humans. Furthermore, non‐classified viruses also shared considerable virus sequences in all the samples, presumably belonging to unexplored virus category. Overall, the present study provides a comprehensive knowledge of diverse viral populations carried by mosquitoes at pig farms, which is a potential source of diseases for mammals including humans and animals. These viral metagenomic data are valuable for assessment of emerging and re‐emerging viral epidemics.