Minimizing decoherence due to coupling of a quantum system to its fluctuating environment is at the forefront of quantum information and photonics research. Nature sets the ultimate limit, however, given by the strength of the system's coupling to the electromagnetic field. Here, we establish the ability to electronically control this coupling and enhance the optical coherence time of the charged exciton transition in quantum dots embedded in a photonic waveguide. By manipulating the electronic wave functions through an applied lateral electric field, we increase the coherence time from ∼1.4 to ∼2.7 ns. Numerical calculations reveal that longer coherence arises from the separation of charge carriers by up to ∼6 nm, which leads to a 30% weaker transition dipole moment. The ability to electronically control the coherence time opens new avenues for quantum communication and novel coupling schemes between distant qubits.