BackgroundWe previously found an association between rurality and death by suicide, where those living in rural areas were more likely to die by suicide. One potential reason why this relationship exists might be travel time to care. This paper examines the relationship between travel time to both psychiatric and general hospitals and suicide, and then determine whether travel time to care mediates the relationship between rurality and suicide.MethodsThis is a population-based nested case-control study. Data from 2007 to 2017 were obtained from administrative databases held at ICES, which capture all hospital and emergency department visits across Ontario. Suicides were captured using vital statistics. Travel time to care was calculated from the resident’s home to the nearest hospital based on the postal codes of both locations. Rurality was measured using Metropolitan Influence Zones.ResultsFor every hour in travel time a male resides from a general hospital, their risk of death by suicide doubles (AOR = 2.08, 95% CI = 1.61–2.69). Longer travel times to psychiatric hospitals also increases risk of suicide among males (AOR = 1.03, 95%CI = 1.02–1.05). Travel time to general hospitals is a significant mediator of the relationship between rurality and suicide among males, accounting for 6.52% of the relationship between rurality and increased risk of suicide. However, we also found that there is effect modification, where the relationship between travel time and suicide is only significant among males living in urban areas.ConclusionsOverall, these findings suggest that males who must travel longer to hospitals are at a greater risk of suicide compared to those who travel a shorter time. Furthermore, travel time to care is a mediator of the association between rurality and suicide among males.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12888-023-04805-w.