Almost half of NHS doctors are junior doctors, while high proportions are women and/or Black, Asian, and Minority Ethnic (BAME) individuals. Discrimination against this population is associated with poorer career-related outcomes and unequal representation. We aimed to qualitatively explore junior doctors' experience of workplace racial and gender-based discrimination, and its impact on their psychological distress (PD). In this study, we carried out a secondary analysis of data from a UK-based parent study about junior doctors' working cultures and conditions. Interview data was examined using thematic analysis. Transcripts (n = 14) documenting experiences of race and/or gender-based discrimination were sampled and analysed from 21 in-depth interviews conducted with UK junior doctors. Four themes were generated about the experiences and perpetrators of discrimination, the psychological impact of discrimination, and organisational interventions that tackle discrimination. Discrimination in various forms was reported, from racially charged threats to subtle microaggressions. Participants experienced profoundly elevated levels of PD, feeling fearful, undermined, and under-confident. Discrimination is associated with elevated levels of PD, whilst negatively impacting workforce sustainability and retention. This reduces the opportunity for more diversity in NHS medical leadership. We encourage NHS hospitals to review their policies about discrimination and develop in-person workshops that focus on recognising, challenging, and reporting workplace discrimination.