Background The world faces the challenge to develop sustainable technologies to replace thousands of products that have been generated from fossil fuels. Microbial cell factories serve as promising alternatives for the production of diverse commodity chemicals and biofuels from renewable resources. For example, polylactic acid (PLA) with its biodegradable properties is a sustainable, environmentally friendly alternative to polyethylene. At present, PLA microbial production is mainly dependent on food crops such as corn and sugarcane. Moreover, optically pure isomers of lactic acid are required for the production of PLA, where D-lactic acid controls the thermochemical and physical properties of PLA. Henceforth, production of D-lactic acid through a more sustainable source (CO2) is desirable. Results We have performed metabolic engineering on Synechocystis sp. PCC 6803 for the phototrophic synthesis of optically pure D-lactic acid from CO2. Synthesis of optically pure D-lactic acid was achieved by utilizing a recently discovered enzyme (i.e., a mutated glycerol dehydrogenase, GlyDH"). Significant improvements in D-lactic acid synthesis were achieved through codon optimization and by balancing the cofactor (NADH) availability through the heterologous expression of a soluble transhydrogenase. We have also discovered that addition of acetate to the cultures improved lactic acid production. More interestingly, 13C-pathway analysis revealed that acetate was not used for the synthesis of lactic acid, but was mainly used for synthesis of certain biomass building blocks (such as leucine and glutamate). Finally, the optimal strain was able to accumulate 1.14 g/L (photoautotrophic condition) and 2.17 g/L (phototrophic condition with acetate) of D-lactate in 24 days. Conclusions We have demonstrated the photoautotrophic production of D-lactic acid by engineering a cyanobacterium Synechocystis 6803. The engineered strain shows an excellent D-lactic acid productivity from CO2. In the late growth phase, the lactate production rate by the engineered strain reached a maximum of ~0.19 g D-lactate/L/day (in the presence of acetate). This study serves as a good complement to the recent metabolic engineering work done on Synechocystis 6803 for L-lactate production. Thereby, our study may facilitate future developments in the use of cyanobacterial cell factories for the commercial production of high quality PLA. [ABSTRACT FROM AUTHOR]