Stepping out to play singles for the first time since leaving Centre Court prematurely and in tears after suffering a hamstring injury in the opening round 12 months ago, Williams was rusty and error-prone.
The will remained and, cheered on by a supportive crowd, she looked like she might stumble over the finish line after coming from a set down and then saving a match point in the 12th game of the decider.
But instead Williams suffered just her third first-round loss at a grand slam, going down 7-5 1-6 7-6 (7) in a deciding tie-break at 10.35pm after three hours and 10 minutes.
At 40, the American’s time in the game is clearly running out, but she remained vague about her future plans and refused to rule out another tilt at Wimbledon next year.
“Like I said coming into this, I’m just planning for right now, seeing how I feel, just to go from there,” she said.
Pressed on whether it was her farewell to the All England Club, Williams added: “That’s a question I can’t answer. I don’t know. Who knows? Who knows where I’ll pop up.”
Tan, a 24-year-old debutante ranked 115, is the type of player Williams used to beat before even stepping on court but no one, including probably the 23-time grand slam singles champion herself, knew what to expect here.
Williams recovered from a very shaky start to lead 4-2 in the opening set but 21 unforced errors proved her downfall.
She composed herself after a short break to close the roof, winning the second set comfortably, and it looked like she might find a way through when she led 3-1 in the decider.
But there were no certainties about Williams here and she was unable to capitalise on a 4-0 lead in the tie-break, with Tan celebrating the best moment of her career.
“I think physically I did pretty good,” said Williams. “I think the last couple of points, I was really suffering there.
“But I feel like in just those key points, winning some of those points, is always something mentally that you kind of need. I did pretty good on maybe one or two of them, but obviously not enough.”
It has been clear for several years that Williams cannot simply turn up and win grand slams now but, with varied business commitments and a young daughter, she has a lot going on in her life besides tennis.
The US Open begins in two months, and Williams gave a positive indication that she will be at Flushing Meadows in August.
“It definitely makes me want to hit the practice courts,” she said. “I feel that it’s actually kind of like, ‘OK, Serena, you can do this if you want’.
“When you’re at home, especially in New York, and the US Open, that being the first place I’ve won a grand slam, is something that’s always super special. There’s definitely lots of motivation to get better and to play at home.”
Williams would surely not have come to the All England Club if she did not believe a record-equalling 24th grand slam title was still a possibility.
Asked if she could be satisfied with Tuesday’s loss being her final Wimbledon memory, she said: “Obviously not. You know me. Definitely not.
“But today I gave all I could do. Maybe tomorrow I could have given more. Maybe a week ago I could have given more. But today was what I could do. At some point, you have to be able to be OK with that.”