"It was a difficult match, Stepanek broke my game four times, and I had to look for my rhythm. He mixes up his shots and is very talented. I don't know how I came through, but I am happy I made it," Xinhua quoted Federer as saying after the match.
Federer's powerful first service reached at some times a speed of 195 km per hour.
The 35-year old Sepanek, ranked 48th in the world, amused the audience from time to time with a couple of funny actions, when he for example started cleaning a part of the court with a towel which he then used to dry his sweaty face.
Federer, 32, won the Dubai open five times in his career, more times than any other male player. With 17 Grand Slam titles and overall 302 weeks world number one placing, Federer is considered one of the greatest tennis players of all times.