The six-time Tony winner and her husband, fellow Broadway star Will Swenson, are expecting their first child together.
The pregnancy was a shock, she added.
"Who knew that tap dancing during perimenopause could lead 2 pregnancy? @thewillswenson & I are completely surprised but elated 2 b expecting," she wrote.
As a result of the pregnancy, McDonald, 45, will take leave from her Broadway show "Shuffle Along" beginning July 24, according to The Associated Press. She is slated to return this winter.
McDonald and Swenson, 42, married in 2012 at their home in Croton-on-Hudson, New York.
McDonald, who formerly starred on the ABC series "Private Practice," has one daughter from a previous marriage, and Swenson has two sons with his former wife.