Codoping with Cu and Mo is shown to have a synergistic effect on the photocatalytic activity of TiO$_2$. The enhancement in activity is observed only if the synthesis route results in TiO$_2$ in which (Cu, Mo) codopants are forced into the TiO$_2$ lattice. Using X-ray photoelectron spectroscopy, Cu and Mo are shown to be present in the +2 and +6 oxidation states, respectively. A systematic study of the ternary system shows that TiO$_2$ containing 6 mol % CuO and 1.5 mol % MoO$_3$ is the most active ternary composition. Ab initio calculations show that codoping of TiO$_2$ using (Mo, Cu) introduces levels above the valence band, and below the conduction band, resulting in a significant reduction in the band gap (∼0.8 eV). However, codoping also introduces deep defect states, which can have a deleterious impact on photoactivity. This helps rationalize the narrow compositional window over which the enhancement in photocatalytic activity is observed.