This study focuses on assessing the knowledge, attitudes, and practices related to Hepatitis B virus (HBV) prevention among medical students in Medina, Saudi Arabia. HBV is a significant global health concern, with a high prevalence in Saudi Arabia. Medical studentsdue to their field, are at higher risk of exposure. Prior studies in Saudi Arabia show varied levels of awareness. This research aims to provide insights that can inform educational initiatives for this specific population. This was a cross-sectional studyconducted from June 2023 to September 2023by using a pre-designed online questionnaire that was distributed among medical students in Medina. Data was analyzed using IBM Corp. Released 2020. IBM SPSS Statistics for Windows, Version 27.0. Armonk, NY: IBM Corp. This study included 307 participants. 67.8% of the participants correctly identified the link between HBV and liver cancer, and 77.5% recognized the transmission risk from carriers. 91.9% acknowledged the transmission via contaminated blood and fluids, and 88.9% recognized the risk from unsterilized instruments. Positive attitudes were observed, with 92.2% agreeing that following infection control guidelines would protect them at work. Practice scores were generally positive, including high rates of screening (57.3%) and adherence to infection control measures (90.2%). Knowledge scores correlated positively with attitude (rho = 0.204) and practice scores (rho = 0.390). A significant proportion of participants had a strong understanding of HBV transmission and the importance of infection control measures. Positive attitudes towards infection control were prevalent, although some reluctance to provide care to HBV-infected individuals was noted.