Students, as a representative of young adults, are at risk for engagement in unhealthy lifestyle behaviors such as unhealthy eating, unhealthy relationships, and drug abuse. Health-promoting lifestyle (HPL) largely depends on adequate knowledge of healthy behaviors and hence, education is a strategy with potential positive effects on lifestyle. This study aimed at evaluating the effects of web-based education (WBE) on HPL among first-year medical sciences students. This quasi-experimental study was conducted in 2020 with a single-group pretest-posttest design. Participants were 185 first-year bachelor's and doctoral medical sciences students selected from Babol University of Medical Sciences, Babol, Iran, through multistage sampling. Study intervention was a three-week web-based educational program on HPL. Educational videos about the different components of HPL were sent to participants through WhatsApp. Data were collected before, one month after, and three months after the study intervention through the Health-Promoting Lifestyle Profile (HPLP2) and the General Health Questionnaire (GHQ). The STATA software (v. 16.0) was used for data analysis. Among 185 participants, 154 (83.69%) participants completed the study. The mean scores of HPL and its health responsibility and stress management subscales significantly increased by 4.58 (95% CI: 0.12, 9.04), 1.77 (95% CI: 0.39, 3.15), and 0.71 (95% CI: 0.13, 1.26), respectively. However, the mean scores of the nutrition, interpersonal relations, physical activity, and self-actualization subscales of HPL and the mean score of general health did not significantly change (P > 0.05). WBE has significant positive effects on HPL and its health responsibility and stress management subscales. Therefore, WBE through social media can be used to improve HPL among young adults, particularly students.