In the world's first pig-to-human cardiac xenotransplant, the elevated levels of porcine cytomeg-alovirus (PCMV) are considered key factors contributing to patient mortality. This has renewed attention to PCMV, a virus widely prevalent in pigs. Currently, there are no effective drugs or vaccines targeting PCMV, and its high detection difficulty poses challenges for prevention and control research. In this study, antiviral small hairpin RNA (shRNA) was selected and inserted into the Rosa26 and miR-17-92 loci of pigs via a CRISPR/Cas9-mediated knock-in strategy. Further in vitro viral challenge experiments demonstrated that these genetically edited pig cells could effec-tively limit PCMV replication. Through this process, we constructed a PCMV-infected cell model, validated partial viral interference sites, enhanced gene knock-in efficiency, performed gene editing at two different gene loci, and ultimately demonstrated that RNA interference (RNAi) technology combined with CRISPR/Cas9 has the potential to generate pig cells with enhanced antiviral infec-tion capabilities. This opens up possibilities for the future production of pig populations with anti-viral functionalities.