Federer, who plays his opening match on Wednesday, said he had decided to compete in Rome after talking to his wife, Mirka, who gave birth to their second set of twins last week.
"They all said I should quickly come and play here," said world number four Federer, who had been expected to miss Rome after pulling out of last week's Madrid Open to be present at the birth of his sons.
"So I was, like, 'OK, if you don't want me around I'll go away'."
Djokovic, the second seed, missed the Madrid Open through injury but appeared in good condition on his return to action.
The Serb, watched by new coach Boris Becker, dropped serve three times but was still too strong for his Czech opponent.
He will play German Philipp Kohlschreiber or Spain's Tommy Robredo in the last 16.
Rafa Nadal and Andy Murray will join Federer in action on Wednesday.
- Sports & Recreation