Hartley, a two-times world endurance champion and Le Mans 24 Hours winner, was a full-time driver for Red Bull-owned Toro Rosso last season but was axed after the final race.
The 29-year-old Hartley joins Pascal Wehrlein, Antonio Fuoco and Davide Rigon in working in the Ferrari simulator in support of F1 racers Sebastian Vettel and Charles Leclerc.
"Our team has taken on four undoubtedly talented drivers, who possess innate feeling, with a strong understanding of race cars and tracks," said team principal Mattia Binotto in a statement.
"These are exactly the qualities required in the skilful role of driving in a simulator, one of the vital pieces of equipment in the Formula One of today."
Russian Daniil Kvyat and Italian Antonio Giovinazzi, who performed simulator duties for Ferrari last year, are racing this season for Toro Rosso and Sauber respectively.
The season starts in Australia on March 17.