Hartley's Toro Rosso teammate Pierre Gasly also suffered an engine problem early in the second session but he was unable to take any further part in practice, eventually finishing with the 19th fastest time. It made it impossible to draw comparisons with Hartley.
They weren't the only team that had problems - Haas, McLaren and Red Bull also suffered problems at the high altitude Mexican track.
Earlier Hartley posted the 18th fastest time in the first practice session. The 27-year-old managed to complete just 10 laps after being forced into the pits with the issue.
Toro Rosso opted to run youngster Sean Gelael in the second car instead of Gasly in that first 90-minute session. Gelael completed 29 laps and set a time slightly faster than Hartley - good enough for 17th fastest.
Mercedes driver Valtteri Bottas topped the timesheets in the early practice, setting a lap 0.466s faster than teammate and championship leader Hamilton.
There is an additional practice session on Sunday morning before qualifying begins 7am NZT.