Nurses are at increased risk of acquiring HB infection due to occupational exposure. To control this infection, basic knowledge and a positive attitude toward HB prevention are required. This study was conducted to assess knowledge, attitude, and practice of HB infection preventative measures among primary healthcare nurses in Buraidah, Saudi Arabia. A descriptive cross-sectional survey was conducted from February to March 2018. A self-administered questionnaire was distributed to all nurses working in primary healthcare centers. Data were analyzed with descriptive and inferential statistics. Of the 335 eligible participants, 262 (78%) responded to the survey. Overall, 41.2% of participants had a moderate level of knowledge about HB; however, there was no significant difference in knowledge between males and females. The majority (94.7%) had positive attitudes toward HB. Male nurses displayed significantly more positive attitudes than female nurses (P = 0.0075). Most of the respondents practiced good compliance with universal precautions. The majority (85.5%) were vaccinated, of whom 72.3% were completely vaccinated. About 14.1% of nurses were exposed to high-risk HB conditions; of these, 40.5% immediately reported their injuries. The majority of participants had moderate knowledge and a positive attitude but still need more information about HB prevention. Improving knowledge, attitudes, and good practices regarding hepatitis B prevention will contribute to increased awareness among nurses, leading to improvement in healthcare services.