Federer has played in only two clay-court tournaments this season. He reached the final in Monte Carlo but missed the Madrid tournament when his second set of twins, boys Leo and Lenny, was born.
His first match after their birth was a loss in Rome.
On Sunday, with the clay court hard and damp due to days of rain and overcast skies, the fourth-seeded Federer was back to himself, winning five of his 11 break points.
"I was happy seeing, getting early signs out of the match that I was actually playing well and I was going to get my chances I was looking for," Federer said. "My personal life, as we know, it's all great, so I'm happy the family is here."
Federer's twin girls, Myla Rose and Charlene Riva, will turn 5 in July. They were sitting in Federer's box along with his wife Mirka at the start.
The French Open is the only Grand Slam tournament to start on Sunday, and Federer played the second match on Court Philippe Chatrier, the main stadium at Roland Garros.
"I wasn't nervous actually going into the match. It's more just like those hints of fear, maybe yesterday, maybe this morning at one point, just for like five seconds, Oh, I really hope I don't have to pack my bags today,' that kind of feeling," Federer said.
Eighth-seeded Milos Raonic of Canada also advanced, beating Nick Kyrgios of Australia 6-3, 7-6 (1), 6-3.
Raonic is the youngest man in the top 10 of the tennis rankings, and Kyrgios was the youngest man in this year's French Open draw at 19.
"I was a bit nervous going out in the first set. That's normal, I think," said Kyrgios, a former top-ranked junior player who won the junior Australian Open in 2013.
Tenth-seeded John Isner hit 23 aces and got the only break of serve he needed in the third set of a 7-6 (5), 7-6 (4), 7-5 victory over 130th-ranked Pierre-Hugues Herbert to also reach the second round.
The 6-foot-10 Isner, best known for playing the longest match in tennis history at Wimbledon in 2010, took 2½ hours to eliminate Herbert, a wild-card entry from France.
Isner saved both break points he faced and converted the only one he earned.
The American's best showings at Roland Garros were a pair of third-round finishes in 2010 and 2013.
Other men's winners included No. 6 Tomas Berdych of the Czech Republic, No. 15 Mikhail Youzhny of Russia and Radek Stepanek of the Czech Republic.
Information from The Associated Press was used in this report.
Federer Cruises Past Lacko
Roger Federer beat Lukas Lacko in straight sets in the first round of the French Open.