A custom-built dynamic-focus swept-source optical coherence tomography (SS-OCT) system with a central wavelength of 1310 nm was used to image the anterior eye from the cornea to the lens. An electrically tunable lens was utilized to dynamically control the positions of focusing planes over the imaging range of 10 mm. The B-scan images were acquired consecutively at the same position but with different focus settings. The B-scan images were then registered and averaged after filtering the out-of-focus regions using a Gaussian window. By fusing images obtained at different depth focus locations, high-resolution and high signal-strength images were obtained over the entire imaging depth. In vivo imaging of human anterior segment was demonstrated. The performance of the system was compared with two commercial OCT systems. The human eye ciliary body was better visualized with the dynamic-focusing SS-OCT system than using the commercial 840 and 1310 nm OCT systems. The sulcus-to-sulcus distance was measured, and the result agreed with that acquired with ultrasound biomicroscopy.