Carminic acid is an aromatic polyketide found in scale insects (i.e., Dactylopius coccus) and is a widely used natural red colorant. It has long been produced by the cumbersome farming of insects followed by multistep purification processes. Thus, there has been much interest in producing carminic acid by the fermentation of engineered bacteria. Here we report the complete biosynthesis of carminic acid from glucose in engineered Escherichia coli. We first optimized the type II polyketide synthase machinery from Photorhabdus luminescens, enabling a high-level production of flavokermesic acid upon coexpression of the cyclases ZhuI and ZhuJ from Streptomyces sp. R1128. To discover the enzymes responsible for the remaining two reactions (hydroxylation and C-glucosylation), biochemical reaction analyses were performed by testing enzyme candidates reported to perform similar reactions. The two identified enzymes, aklavinone 12-hydroxylase (DnrF) from Streptomyces peucetius and C-glucosyltransferase (GtCGT) from Gentiana triflora, could successfully perform hydroxylation and C-glucosylation of flavokermesic acid, respectively. Then, homology modeling and docking simulations were performed to enhance the activities of these two enzymes, leading to the generation of beneficial mutants with 2–5-fold enhanced conversion efficiencies. In addition, the GtCGT mutant was found to be a generally applicable C-glucosyltransferase in E. coli, as was showcased by the successful production of aloesin found in Aloe vera. Simple metabolic engineering followed by fed-batch fermentation resulted in 0.63 ± 0.02 mg/L of carminic acid production from glucose. The strategies described here will be useful for the design and construction of biosynthetic pathways involving unknown enzymes and consequently the production of diverse industrially important natural products.