The native of Blainville, Que., had a chance to score the upset in a hard-fought marathon on the showcase court at Crandon Park but sent a forehand long in the tenth game of the final set and fell 4-6, 6-4, 7-6 (5).
"You have to close out these tough matches," Wozniak said. "I had that match point against her but I wasn't able to stay mentally tough. You need to keep fighting.
"We both played well. It was a matter of converting on the important points."
Williams, who won a trio of Miami titles starting 14 years ago and whose ranking has dropped to 134 as she plays for the first time since the US Open, managed to hang on in a match featuring 32 break points and 14 conversions.
Wozniak served for the match at 5-4 in the final set, but dumped a forehand in the net. Talking later about the situation, Williams claimed to be unaware Wozniak had been so close to victory.
"She had match point?" Williams said. "Oh no. Thank God I'm oblivious to the score a lot of times."
The tiebreaker swung Williams' way when she smacked an overhead that clipped the net cord before landing softly for a winner and a 4-2 lead. On the final point, she somehow found the strength to whack a powerful service winner.
"That's the serve I wanted — just a big one to hopefully force the issue," Williams said. "Thank God it went in. Wow."
She'll need to recover quickly for a fourth-round match Monday night against No. 15-seeded Ana Ivanovic, who beat No. 20 Daniela Hantuchova 6-2, 7-6 (2).
"It's never easy in the intense moments, a lot goes on in the mind," said Wozniak. "You are fighting and you want every point so badly, you want to make an ace or hit a winner. This was a tough one to lose."
Wozniak — ranked 65th in the world — had never faced the elder Williams sister but had defeated her sister Serena in a 2008 Stanford semifinal on the way to that title. Wozniak came to Miami with confidence after winning a lower-level event last week in Nassau, Bahamas.
Wozniak opened with authority as she broke Williams in the first game but was then forced to save six break points on her first two service games to maintain the margin.
Wozniak struck 30 winners and had 39 unforced errors, compared to 70 unforced for Williams.
"Overall it was positive, so I can't be too disappointed, even if I am right now," said Wozniak. "I came close against a top player, but I have to win these matches."
Williams has ben suffering with an immune system disease which saps her energy and was playing in he first event since the US Open.
The three-set victory was her second in less than 48 hours.
"I just kept coming back," Williams said. "I tried not to let anything discourage me."
Other winners included Rafael Nadal, bidding for his first Key Biscayne title, and two-time champion Victoria Azarenka.
Nadal, seeded No. 2, defeated 33-year-old Radek Stepanek 6-2, 6-2 and has lost only six games in two rounds.
"Good, solid start of the tournament," Nadal said. "Two good matches, comfortable wins."
The top-ranked Azarenka improved to 25-0 this year by beating wild card Heather Watson 6-0, 6-2.
No. 4-seeded Andy Murray, the 2009 champion, advanced in a walkover when Canadian Milos Raonic withdrew because of a sprained right ankle. Raonic said he doesn't believe the injury is serious.
The No. 10-seeded Isner, coming off a runner-up finish at Indian Wells a week ago, lost to No. 19 Florian Mayer, 6-4, 6-2.
Grigor Dimitrov advanced by upsetting No. 7 Tomas Berdych 6-3, 2-6, 6-4 for his first win over a top 10 opponent at the 10th time of trying.
No. 9 Janko Tipsarevic beat No. 18 Alexandr Dolgopolov 6-4, 5-7, 6-2.
In other women's play, wild card Garbine Muguruza Blanco eliminated No. 24 Flavia Pennetta 6-2, 1-6, 7-6 (6). No. 7 Marion Bartoli eliminated Simona Halep 6-4, 7-6, (6).
On a sweltering spring afternoon, Williams looked lethargic at the outset, struggled with an erratic forehand and kept falling behind. She played with straps on her right ankle and right calf, and often seemed a step late to the ball.
"Wake up, Venus!" a fan shouted in the second set. Serena, who plays her fourth-round match Monday, watched solemnly from the club section of the stadium.
"I didn't feel that great, and I was kind of starting to panic," Venus said. "I needed to calm down and try to figure out a strategy that was going to work a little better than what I was doing at the moment."
She managed to pull even after two sets, then fell behind 4-2 in the third set and looked increasingly weary. During one changeover she hung her head for 15 seconds before slowly lifting it to take sips from two drink bottles.
Wozniak looked fresher, but the wild card from Canada couldn't serve out the match. Instead, the opportunity unnerved her. She hit consecutive double-faults and committed unforced errors on the game's final three points, which made it 5-all.
Play continued for another half hour before another match point, this one held by Williams. After her service winner clinched the victory, she managed to raise both fists and muster a smile.
A former No. 1 and seven-time Grand Slam singles champion, Williams is ranked No. 134 and needed a wild card to enter the tournament. She's trying to improve her ranking enough in the coming weeks to qualify for the London Olympics.
"Whenever things look bleak, I think about the Olympics," Williams said. "That keeps me motivated."
— with files from The Associated Press.