struggled through a back injury earlier this year, dominated the 62nd ranked Zemlja, ripping 35 winners and committing just 16 unforced errors in the 93-minute win.
Despite slipping in the rankings and entering the tournament as the seventh seed - his lowest seeding at the US Open in over a decade - Federer said he does not think about retirement.
"Right now I love it," said Federer, the all-time leader with 17 grand slam singles titles whose last major triumph came last year at Wimbledon.
The 32-year-old Swiss said his passion for the game is as strong as ever.
"Clearly, when you win everything it's fun," said Federer, whose last major triumph came last year at Wimbledon.
"That doesn't necessarily mean you love the game more. You just like winning, being on the front page, lifting trophies, doing comfortable press conferences. It's nice.
"But that doesn't mean you really actually love it, love it. That maybe shines through maybe more in times when you don't play that well. For me, I knew it, winning or losing, practice court or match court, that I love it."
Federer showed that love by hitting the practice courts right after his victory against the big-hitting Zemlja to put in more time on his groundstrokes after adapting an aggressive, forward-moving strategy to defuse the Slovenian's weapons.
"Hardly any rallies today," explained Federer. "Decided to work out some more on the practice courts."
Federer's match had been scheduled to cap the Monday night program at Arthur Ashe Stadium but was postponed because of rain.
Next up for Federer will be Carlos Berlocq of Argentina, a 6-3 3-6 6-7 (6) 6-4 6-2 winner over Colombia's Santiago Giraldo.
Giraldo had led Berlocq 2-1 in the fourth set when Monday's rain forced them to complete their match on Tuesday.
Federer took a few games to find his rhythm against Zemlja but from 3-3 in the first set, he won nine of the next 11 games to go up two sets to love.
A break in the seventh game of the third set gave Federer a 4-3 lead but the hard-hitting Zemlja raised his game and broke the Swiss on his third successive break point in the next game to bring the set back on serve.
Federer shut the door after that, whipping a forehand cross court winner to break for a 6-5 lead and crushed a forehand volley to end the match.