The Cypriot is playing in LA for the second time, earning his first win at the venue after a defeat four years ago.
He will next face American John Isner, a winner over German fifth seed Benjamin Becker 7-6 (10-8), 7-6 (7-3).
Safin, who has complained he is bored with tennis life and desperate to try something different in life, looked like going down to his fourth first-round loss of the throwaway season.
But after dropping the first, he suddenly sprang to life to race away with the second set at the expense of Ginepri, who climbed from just inside the Top 100 to 56th this week.
Safin went up a double break in the third set, Ginepri got one back but the Russian managed to hold on, booking a second-round encounter with Latvian Ernests Gulbis, who beat Taiwan's Yen-Hsun Lu 7-5, 6-2.
Other seeds had mixed results, with Russian number fifth Igor Kunitsyn defeating Indian qualifier Somdev Devvarman 7-5, 6-2.
Australian 205th-ranked qualifier Carsten Ball put out Frenchman Marc Gicquel 6-2, 7-5 (8-6) to next face third seed Dmitry Tursunov.