“As I said in the article, I’m terrible at goodbyes. But goodbye, Toronto,” she said in an on-court interview after the match.
Together with her older sister Venus, she helped transform the sport, regularly winning grand slams in both singles and doubles tennis.
The 40-year-old has accumulated 73 career singles titles, 23 doubles titles and two mixed doubles titles which includes 39 grand slam titles — 23 singles titles, 14 doubles titles and two mixed doubles titles.
“It was a lot of emotions, obviously,” Williams told the crowd, speaking about the match.
“I love playing here, I’ve always loved playing here. I wish I could have played better but Belinda played so well today. It’s been an interesting 24 hours.
“Anyways, this is what it is. I was really happy to be out here today and play in front of you guys, thanks for the support.”
Supporters packed into the 12,500-seater stadium to watch Williams’ farewell and tournament organizers set up an outdoor viewing area for the first time ever that held another 5,000.
Inside the stadium, the crowd held up signs saying, “Thank you Serena,” “23 We Will Miss You,” or simply “Queen.”
A farewell presentation ended with Williams accepting a gift from the NHL’s Toronto Maple Leafs and the NBA’s Toronto Raptors.
Williams is expected to play at the Western and Southern Open in Cincinnati next, followed by the US Open which she has suggested will be her final tournament.
Meanwhile, Coco Gauff defeated Wimbledon champion Elena Rybakina 6-4 6-7 (8) 7-6 (3) in a marathon 2 hour and 49-minute match on Wednesday to advance to the last 16.
Nick Kyrgios also advanced to the last 16 with an impressive 6-7 (2) 6-4 6-2 victory over world No.1 Daniil Medvedev.
CNN’s Ben Morse contributed to this report.