Evidence on the association between temporary employment and mental health is mixed. This study examined associations of temporary employment with register-based antidepressant medication by type and length of temporary job contract and socioeconomic position. Antidepressant prescriptions (1998-2002) were linked to register data for 17,071 men and 48,137 women in 10 Finnish municipalities. Repeated measures analyses over time were adjusted for age, socioeconomic position, and calendar year. After adjustments, temporary employment with a job contract more than 6 months was associated with odds ratio (OR) of 1.18 (95% confidence interval CI 1.03-1.37) for antidepressant use in men and 0.99 (0.93-1.06) in women. Among temporary employees with a job contract of 6 months or less the corresponding odds ratio was higher (OR 1.43, 95% CI 1.19-1.73 in men, OR 1.18, 95% CI 1.09-1.28 in women). Long-term unemployed who were in short-term government-subsidised temporary employment had the highest odds of antidepressant use (OR 1.57, 95% CI 1.23-2.02 in men, OR 1.38, 95% CI 1.20-1.59 in women). During the study period, increase in the prevalence of antidepressant medication was more rapid among women in government-subsidised temporary employment than among permanently employed women. Among men, the association between temporary employment and antidepressant use was stronger within lower grade occupations. The results suggest that using antidepressants is more pronounced when temporary employment is unstable.