The taxi driver and a passenger in the car suffered minor injuries.
LIRR officials say the vehicle crashed through a fence at the Syosset station at about noon Sunday and drove onto the tracks. The flames were quickly extinguished.
Service between Hicksville and Huntington was restored after the taxi was removed.
Officials did not immediately know what caused the vehicle to crash through the fence.