Defending world champion Ding, who goes into Wednesday's final as the favourite, defeated Feng Tianwei of Singapore 4-2. Feng was born in China and emigrated to Singapore.
Li will be a decided underdog after defeating Kasumi Ishikawa of Japan 4-1. Ding has won 6 of 10 official matches against teammate Li, and defeated her in the final last year of the world championships. Ding has won 6 of their last 7 matches.
Feng and Ishikawa will play for bronze on Wednesday.
China has monopolized pingpong, winning 20 of 24 gold medals since the sport was introduced in the 1988 Olympics.