In the opening set of their last-16 clash, the Polish player Swiatek struck a double-fault to hand the unseeded Haddad Maia a 3-2 lead and the Brazilian leaned on her powerful serve and groundstrokes to close out the frame without facing a break point.
Swiatek fended off five break points to hold serve in a 15-minute opening game of the second set and later consolidated a break for a 5-2 lead before going on to force a decider.
World number 24 Haddad Maia broke Swiatek three times in the third set, including in the final game on her fourth match point when the Pole sent a forehand wide.
"I knew that all the matches here would be very tough, not only top 20 players, like the first round, was a very, very tough round and I won in three sets as well," Haddad Maia said.
"Tennis is like that. It doesn't matter where you are playing, which court and with who. You need to push yourself to improve your game and I think that was the key for both (of my three-set) victories and I am very proud of myself."
French Open champion Swiatek, who had a run of 37 straight wins halted in the third round at Wimbledon last month, said she struggled with the windy conditions.
"Next time maybe I'm going to be able to find, even though the conditions are going to be bad, more solutions and just play more solid. Because I did a lot of mistakes that I kind of don't accept," she said.