Phages are pivotal in shaping microbial communities and biogeochemical cycles, while our understanding of the diversity, functions potential, and resistance gene carriage of phages in hospital wastewater (HWW) remains limited. We collected influent and effluent samples from the 3 hospital wastewater treatment plants (HWTPs) to assess the diversity and fate of phages, the interactions between phages and hosts, and the presence of resistance genes and auxiliary metabolic genes (AMGs) encoded by phages. Compared to influent, effluent showed reduced phage abundance and altered composition, with decreases in Microviridae and Inoviridae. The gene-sharing network highlights that many phages in HWW are not classified in known viral genera, suggesting HWW as a rich source of new viruses. There was a significant association between phages and microorganisms, with approximately 32.57 % of phages expected to be capable of infecting microbial hosts, characterized primarily by lytic activity. A total of 8 unique antibiotic resistance genes, 13 unique metal resistance genes, and 5 mobile genetic elements were detected in 3 HWTPs phageomes. Phage AMGs have the potential to influence carbon, nitrogen, phosphorus, and sulfur metabolism, impacting biogeochemical cycles. This study reveals the genomic diversity and ecological role of phages in HWTPs, highlighting their environmental and ecosystem impact.