BACKGROUND: Moonlighting is a largely discussed, however under-explored, subject among physician residents. OBJECTIVES: To analyze the frequency of moonlighting and its related factors. DESIGN AND SETTING: This cross-sectional study enrolled medical residents from all geographical regions of Brazil. METHODS: A web-based structured closed-ended survey was applied that explored the frequency and type of moonlighting, residency programs characteristics, and psychological distress. The questionnaire was published on social networks. RESULTS: The completion rate was 71.4% (n = 1,419) and 37.7% were males aged 28.8 ± 3.2 (mean ± standard deviation) years, and 571 (40.2%) were post-graduate year (PGY) 1. There were residents from 50 medical specialties (the most common training area was clinical, 51.9%). A total of 80.6% practiced moonlighting, with an average weekly workload of 14.1 ± 9.4 h, usually overnight or in weekend shifts. Factors related to it were being PGY-2 or higher (adjusted odds ratio = 3.90 [95% confidence interval = 2.93-5.18], logistic regression), lower weekly residency duty hours (0.98 [0.97-0.99]), and a higher salary (1.23 [1.08-1.40]). In contrast, perception of a "fair/adequate" compensation was influenced by age (1.02 [1.01-1.02]), not being single (1.05 [1.01-1.10]), and residency duty hours (1.51 [1.22-1.88]). Depression, anxiety, diurnal somnolence scores, and work-personal life conflicts were not correlated with moonlighting status. CONCLUSION: Moonlighting frequency is high, and it is related to higher PGY, briefer residency duty hours, and the perception that remuneration should be higher. This study provides insights into the motivations for moonlighting and effort-reward imbalance.