"I don't really play that often, so when I do, I need to play well", she said.
The first Murguruza victory was in the second round of the French Open in 2014, when the Spaniard took out Williams 6-2, 6-2.
Williams was playing her first tournament since the Australian Open in late January, when she lost in the quarterfinals.
Muguruza was winning 6-3 1-0 when Williams was forced to withdraw from the third round meeting.More news: Molinari charges to a 64 to win at Arnie’s place
More news: Ethiopian Airlines plane with 157 people on board crashes minutes after take-off
More news: Liverpool will win their remaining games - Kompany
"By the score, it might have looked like I started well, but I was not feeling at all well physically", Williams said. As long as Venus has her return working and is spraying winners, you can live with an inconsistent serve and a higher number of break points.
A two-time Grand Slam singles victor, the 25-year-old Spaniard now has a 3-3 record against Williams including a win in the 2016 French Open final and a loss in the 2015 Wimbledon final, but she said this victory didn't come with the usual sense of triumph.
Halep, the 2015 champion, was challenged but got past qualifier Kateryna Kozlova 7-6 (7-3) 7-5.
Two seeded women lost: No. 11 Anastasija Sevastova, who retired trailing 5-0 in the first set against No. 21 Anett Kontaveit, and No. 15 Julia Goerges, who lost to Mona Barthel 7-5, 1-6, 6-4. The former World No.1 extended her lead even further by breaking McHale at love for a 5-1 lead, punctuating that game with a bruising forehand service return for a clean victor.
The Romanian was one of six seeds to progress, with Svitolina joining her after a 7-5 6-4 win over Daria Gavrilova.