Dermatology is one of the least diverse specialties, while patients from minority racial and ethnic groups and other underserved populations continue to face numerous dermatology-specific health and health care access disparities in the US. To examine the demographic characteristics and intended career goals of graduating US allopathic medical students pursuing careers in dermatology compared with those pursuing other specialties and whether these differ by sex, race and ethnicity, and/or sexual orientation. This secondary analysis of a repeated cross-sectional study included 58 077 graduating allopathic medical students using data from the 2016 to 2019 Association of American Medical Colleges Graduation Questionnaires. The proportion of female students, students from racial and ethnic groups underrepresented in medicine (URM), and sexual minority (SM) students pursuing dermatology vs pursuing other specialties. The proportions and multivariable-adjusted odds of intended career goals between students pursuing dermatology and those pursuing other specialties and by sex, race and ethnicity, and sexual orientation among students pursuing dermatology. A total of 58 077 graduating students were included, with 28 489 (49.0%) female students, 8447 (14.5%) URM students, and 3641 (6.3%) SM students. Female students pursuing dermatology were less likely than female students pursuing other specialties to identify as URM (96 of 829 [11.6%] vs 4760 of 27 660 [17.2%]; P < .001) or SM (16 [1.9%] vs 1564 [5.7%]; P < .001). In multivariable-adjusted analyses, students pursuing dermatology compared with other specialties had decreased odds of intending to care for underserved populations (247 of 1350 [18.3%] vs 19 142 of 56 343 [34.0%]; adjusted odd ratio [aOR], 0.40; 95% CI, 0.35-0.47; P < .001), practice in underserved areas (172 [12.7%] vs 14 570 [25.9%]; aOR, 0.40; 95% CI, 0.34-0.47; P < .001), and practice public health (230 [17.0%] vs 17 028 [30.2%]; aOR, 0.44; 95% CI, 0.38-0.51; P < .001) but increased odds of pursuing research (874 [64.7%] vs 29 121 [51.7%]; aOR, 1.76; 95% CI, 1.57-1.97; P < .001) in their careers. Among students pursuing dermatology, female, URM, and SM identities were independently associated with increased odds of caring for underserved populations (eg, URM: aOR, 4.05; 95% CI, 2.83-5.80) and practicing public health (eg, SM: aOR, 2.55; 95% CI, 1.51-4.31). URM students compared with non-URM students pursuing dermatology had increased odds of intending to practice in underserved areas (aOR, 3.93; 95% CI, 2.66-5.80), and SM students compared with heterosexual students pursuing dermatology had increased odds of intending to become medical school faculty (aOR, 1.60; 95% CI, 1.01-2.57), to pursue administrative roles (aOR, 1.60; 95% CI, 1.01-2.59), and to conduct research (aOR, 1.73; 95% CI, 1.01-2.98). The findings of this cross-sectional study suggest that diversity gaps continue to exist in the dermatology workforce pipeline. Efforts are needed to increase racial and ethnic and sexual orientation diversity and interest in careers focused on underserved care and public health among students pursuing dermatology.