The Toyota Labour Standards Inspection office, a local branch of Japan's labour ministry, refused to pay the widow the usual compensation for a spouse's work-related death, saying the man had only logged 45 hours of overtime in the month before he died, Japanese media reported.
But the court ruled that the employee had worked far more than that, said Yomiuri Online, a Japanese news website. The Nagoya District Court in central Japan said the ruling overturned the labour ministry's decision.
"We want to think of how to respond to this ruling by discussing it with relevant agencies," an official at the Toyota Labour Standards Inspection Office told Reuters.
The employee, who was working at a Toyota factory in central Japan, died of irregular heartbeat in February 2002 after passing out in the factory about 04:00.
"(The employee) worked for extremely long hours and the relationship between his work and death is strong," Yomiuri Online quoted Judge Toshiro Tamiya as saying.
Overworking is a serious issue in Japan, where an average worker uses less than 50% of paid holidays, according to government data.
In fiscal year 2005-2006, the labour ministry received 315 requests for compensation from the bereaved families of workers who died of strokes and other illnesses seen as work-related.
Toyota said in a statement it would further improve the management of its employees' health.