The present study was conducted with the aim of investigating the relationship between health-promoting lifestyle profile (HPLP) among medical students and contextual factors such as gender, age, field of study, academic level, marital status, history of physical and mental illnesses, and smoking. The present research was conducted in a cross-sectional method in 2021 on 500 students of Shiraz University of Medical Students. An e-questionnaire link was sent to them via email. The research tool was the HPLP questionnaire consisting of 52 questions in six domains in a 4-point Likert scale. Data were analyzed using SPSS software version 24 with one-sample t-test, independent t-test, analysis of variance, and Tukey's post hoc test. A total of 500 students fully answered the questions completely. All components of a healthy lifestyle-except for exercise-obtained a score higher than the cut-off point. The component of Self-Actualization (spiritual growth) (3.035 ± 0.68) had the highest score, while the lowest score was related to exercise and physical activity (2.126 ± 0.60). Married individuals had a better average health score compared to singles (p = 0.047). The average health score did not have a significant relationship with gender, but significantly related to age, field of study (p < 0.001), history of mental illnesses (p < 0.001) and Smoking (p < 0.001). It seems that university officials should pay more attention to the health domain of students' lifestyles, such as nutrition, the development of exercise and physical activities, and the management of stress and mental health. Additionally, providing necessary awareness and considering training courses, as well as developing sports and recreational facilities, can be effective in creating a better environment for the growth and development of students and ensuring their well-being.