Initially, the ministry said 22 people died, but it later revised the number.
The train was traveling between the cities of Shulin and Taitung when it derailed Sunday on a coastal line reportedly popular with tourists.
The train was carrying 366 passengers when the accident occurred just before 5 p.m. local time, the transport ministry said.
All eight train carriages derailed in the incident, with five of those overturning, the ministry said.