Unhealthy behaviors of medical students influence their attitudes toward preventive counseling. The burden of chronic diseases is continually growing in developing countries, emphasizing the need for the increased role of general practitioners in preventive counseling. The objective of this study was to describe the effect of medical training on the risk profiles and attitudes of medical students toward preventive counseling in a Colombian university. Students in their first and fifth years of training were surveyed using the "Healthy Doctor = Healthy Patient" questionnaire to assess counseling attitudes; personal practices, such as risky drinking, smoking, inadequate nutrition, and non-compliance with physical activity recommendations; and the university environment. The association among these components was estimated, as well as the effect of the university environment. Risky drinking and smoking decreased from first to fifth year (59.3% vs. 37.1%, P = 0.021 and 31.5% vs. 25.9%, P = 0.51, respectively), whereas inadequate nutrition and non-compliance with physical activity recommendations increased. Physical activity (PA) was associated with positive counseling attitude (ORs: nutrition 7.6; alcohol 5.2; PA 10.6). Areas governed by institutional policies that are emphasized in the curriculum positively affected student practices. PA promoted preventive counseling and healthy lifestyles most effectively. Universities should therefore strengthen their preventive medicine curricula and modify social determinants.