There is increasing evidence that depression can be prevented; however, universal approaches have had limited success. Appropriate targeting of interventions to at-risk populations has been shown to have potential, but how to selectively determine at-risk individuals remains unclear. Workplace stress is a risk factor for depression and a target for intervention, but few interventions exist to prevent depression among workers at risk due to heightened stress. This trial aimed to evaluate the efficacy of a smartphone-based intervention in reducing the onset of depression and improving related outcomes in workers experiencing at least moderate levels of stress. A randomized controlled trial was conducted with participants who were currently employed and reported no clinically significant depression and at least moderate stress. The intervention group (n=1053) were assigned Anchored, a 30-day self-directed smartphone app-based cognitive behavioral- and mindfulness-based intervention. The attention-control group (n=1031) were assigned a psychoeducation website. Assessment was performed via web-based self-report questionnaires at baseline and at 1-, 3-, and 6-month postbaseline time points. The primary outcome was new depression caseness aggregated over the follow-up period. The secondary outcomes included depressive and anxiety symptoms, stress, well-being, resilience, work performance, work-related burnout, and quality of life. Analyses were conducted within an intention-to-treat framework using mixed modeling. There was no significant between-group difference in new depression caseness (z score=0.69; P=.49); however, those in the Anchored arm had significantly greater depressive symptom reduction at 1 month (Cohen d=0.02; P=.049) and 6 months (Cohen d=0.08; P=.03). Anchored participants also showed significantly greater reduction in anxiety symptoms at 1 month (Cohen d=0.07; P=.04) and increased work performance at 1 month (Cohen d=0.07; P=.008) and 6 months (Cohen d=0.13; P=.01), compared with controls. Notably, for Anchored participants completing at least two-thirds of the intervention, there was a significantly lower rate of depression onset (1.1%, 95% CI 0.0%-3.7%) compared with controls (9.0%, 95% CI 6.8%-12.3%) at 1 month (z score=4.50; P<.001). Significant small to medium effect sizes for most secondary outcomes were seen in the highly engaged Anchored users compared with controls, with effects maintained at the 6-month follow-up for depressive symptoms, well-being, stress, and quality of life. Anchored was associated with a small comparative reduction in depressive symptoms compared with controls, although selective prevention of case-level depression was not observed in the intention-to-treat analysis. When users adequately engaged with the app, significant findings pertaining to depression prevention, overall symptom reduction, and functional improvement were found, compared with controls. There is a need for a greater focus on engagement techniques in future research. Australian New Zealand Clinical Trials Registry (ANZCTR) ACTRN12620000178943; https://www.anzctr.org.au/Trial/Registration/TrialReview.aspx?id=378592.