Writing for Vogue, the American 23-time Grand Slam singles champion said she is moving towards "other things that are important to me", adding she does not like the word "retirement".
In an accompanying Instagram post, she wrote that "the countdown has begun".
"I'm gonna relish these next few weeks," the 40-year-old said.
Williams made her singles return at Wimbledon in June after a lengthy injury lay-off that had led to speculation about her retirement.
She says she will play at the US Open, where she has won six of her major singles titles, later in August.
Williams has won more major singles title than any female player in the Open era and the second most of all time, behind Margaret Court's 24.