The identification of risk factors for depression is necessary for the primary prevention of depression. The aim of this study is to determine whether self-efficacy (SE) is associated with onset of depression among workers. Medical expenditure records of 1,803 workers, who were clerks, system engineers, researchers, and service and sales workers in a software development company, were analyzed. Gender, age, job post, marital status, working hours, and SE were measured at baseline. Participants were divided according to quartiles of SE points. Risk ratios for undergoing a medical consultation due to depression were calculated using a multivariable Cox proportional hazards model. Of the 1,803 participants, 58 underwent medical consultation due to depression during a mean of 1.8 years of follow-up. Compared with the lowest quartile (Q1) of SE, adjusted hazard ratios (HR) were 0.65 (95%CI 0.34–1.25) for Q2, 0.49 (0.24–1.00) for Q3, and 0.40 (0.18–0.88) for Q4. In men, adjusted HRs were 0.87 (0.41–1.86) for Q2, 0.61 (0.26–1.41) for Q3, and 0.37 (0.14–0.98) for Q4. In women, no significant association was found. The present study suggests that low SE is a risk factor for onset of depression among male Japanese workers.