The optoelectronic properties of colloidal quantum dots (cQDs) depend critically on the absolute energy of the conduction and valence band edges. It is well known these bandedge energies are sensitive to the ligands on the cQD surface, but it is much less clear how they depend on other experimental conditions, like solvation. Here, we experimentally determine the band-edge positions of thin films of PbS and ZnO cQDs via spectroelectrochemical measurements. To achieve this, we first carefully evaluate and optimize the electrochemical injection of electrons and holes into PbS cQDs. This results in electrochemically fully reversible electron injection with >8 electrons per PbS cQDs, allowing the quantitative determination of the conduction band energy for PbS cQDs with various diameters and surface compositions. Surprisingly, we find that the band-edge energies shift by nearly 1 eV in the presence of different solvents, a result that also holds true for ZnO cQDs. We argue that complexation and partial charge transfer between solvent and surface ions are responsible for this large effect of the solvent on the band-edge energy. The trend in the energy shift matches the results of density functional theory (DFT) calculations in explicit solvents and scales with the energy of complexation between surface cations and solvents. As a first approximation, the solvent Lewis basicity can be used as a good descriptor to predict the shift of the conduction and valence band edges of solvated cQDs.