Introduction: Medical students still have many doubts regarding HPV (Human papillomavirus) and the vaccine against this virus. Objective: The study aimed to assess the University of Brasilia medical students’ grasp of knowledge about HPV, its relationship with cancer, and the vaccine against the virus. Methods: A cross-sectional study was undertaken by applying a survey questionnaire on the topics. The evaluation involved 379 respondents, 72.7% of the 521 students from the 1st to the 6th years enrolled in the second semester of 2017. The statistical analyses included differences between means and proportions, effect size measures, and the correlation between the identified indicators. The study was approved by the Ethics Committee in Research on Human Beings of the School of Medicine (1,989,835). Results: The 50-item knowledge score increased progressively with the year attended by the medical students (r= .706, p< .001), and was higher among the sexually-active compared to celibate participants (t = 3.26, df = 275, p = 0.001, d = 0.37), as well as among participants with higher family income compared to those with lower family income (t= 2.91, df= 366, p= .004, d= .35). No significant score differences emerged between participants grouped by gender, sexual behavior, or HPV vaccination status. Furthermore, gender (female; OR= 6.5, p<.001), age range (<24 years; OR= 3.3, p= .001), sexuality (active; OR= 2.7, p= .002), but not overall knowledge were predictors of the wish to be vaccinated among the 297 unvaccinated students. Conclusion: The study revealed a strong correlation of medical students’ HPV-related knowledge with medical school year and significantly higher scores among sexually active and higher-income respondents, but there were no essential differences between males and females or between vaccinated and unvaccinated students. Among the latter participants, gender, age, and sexuality, but not knowledge, were the best predictors of the wish to be vaccinated. The findings suggest the need for improving HPV screening and vaccination programs and educational strategies regarding HPV-related diseases.