Abstract Hydrodynamic wall effects are treated with an image or reflection method. This method uses a mirror image of the molecule, with the opposite velocity, to satisfy the non-slip boundary condition of zero velocity of the liquid at the wall. Molecules moving inside a slit require an infinite series of images, or reflections from both walls, whose effects converge slower for thinner slits. It is shown that, with the same external field, wall effects increase the electrophoretic stretch of DNA, more so for thinner slits. The theory is in fairly good agreement with stretch experiments on T4 DNA in slits of width 5, 0.3, and 0.09 μm by Bakajin et al. (Phys. Rev. Let. 80 (1998) 2737). For the same slits relaxation data are available for T4 DNA first hooked around an obstacle, stretched in a U-shape in an external electric field, and sliding off until the stretched molecule moves away in free electrophoresis. The theory approximates the relaxation of the molecule, after detachment from the obstacle, as the relaxation of tethered DNA stretched in a temporary electric field. The theory agrees fairly well with the experiments. The significance of electroosmotic flow is discussed for electrophoretic experiments. An Appendix gives numerical data on the free electrophoresis of unstained and stained DNA, and discusses problems of the kinetic diameter of DNA.