Serena Williams says she revealed her pregnancy by accident, after mistakenly uploading a photograph on Snapchat.
The 23-time Grand Slam winner posted a picture on the social media app, posing in a mirror with the message: "20 weeks", before deleting it, with her publicist later confirming the news.
Williams, 35, said she took photographs every week to track the pregnancy.
"I was just saving them [for myself]" she said. "I've been so good about it, but this was the one time it slipped."
The world number one, who is due to give birth in the autumn, said she discovered she was pregnant just two days before the Australian Open in January.
The American went on to beat sister Venus in the final and win her an Open-era record 23rd Grand Slam singles title.
"It wasn't very easy," she said. "You hear all these stories about people when they're pregnant - they get sick, they get really tired, really stressed out.
"I had to really take all that energy and put it in a paper bag, so to say, and throw it away.
"Pregnant or not, no-one knew and I was supposed to win that tournament. Every time I play, I'm expected to win. If I don't win, it's actually much bigger news."
Williams, who is taking maternity leave for the rest of the 2017 season, said there was no change to her plan to return to the tour as a mother next year.
"I definitely plan on coming back. I'm not done yet," said Williams, who credited 36-year-old sister Venus for inspiration.
"If she's still playing, I know I can play. This [motherhood] is just a new part of my life. My baby's going to be in the stands and hopefully cheering for me."
On Tuesday, Williams called Ilie Nastase's comments about her unborn child "racist".
Nastase, a former world number one and two-time Grand Slam winner, was heard speculating whether Williams' child would be "chocolate with milk?" at a news conference before Romania's Fed Cup tie with Great Britain last week.