Williams was able to return to the court at Arthur Ashe Stadium to see off the Croat in dominant fashion.
Williams beat Muchova 6-3, 6-2 after as she converted five out of nine break points against Karoliona Muchova.
Finally, the six-time US Open champion sealed the match with a forehand return victor to march on.
No matter. McNally was ready and she arrived with a game that seemed forged by the memory of some of the players Williams used to face 20 years ago.
One point from surrendering a break into a tie-breaker, McNally won six of the final seven points, the last on a service victor, to capture the first set. "I don't know why", said Williams, who will face No. 18 Wang Qiang of China next.
McNally said: "I've watched her so many times". Nevertheless, she won the next two points to break and looked to be moving well as she wrapped up victory after heavy strapping was applied to her right foot.
Martic is enjoying her best year of her career, as she won her first title in Turkey and has actually improved her success in grand slam play.
The match proved a far more gruelling affair for Williams than she had in her opener, where she dismantled Maria Sharapova with one of her most dominant performances since returning from maternity leave in 2018.
"I was also lucky to find my way back in the second set and to win in straight sets", Djokovic added. However, the world number 44 was unable to capitalize on her advantage as she was immediately broken straight back in the following game with Williams knowing that anything other than a break will put her in a risky position. Whether it has something to do with being in NY or just her form, it has been pretty hard to stop her. Williams lost the first set 5-7, but came back to win the second two with an impressive 6-3, 6-1 victory.
When is Serena Williams vs Petra Martic on and what time does it start? . I've just got to keep playing and believing'. "I was definitely tested". I knew what my opponent could do.
Federer had dropped the opening set in his first two matches for the first time in his 19 US Open appearances.