Hartline began his study of retinal electrophysiology as a National Research Council Fellow at Johns Hopkins University, Baltimore, receiving his M.D. in 1927. After attending the universities of Leipzig and Munich as an Eldridge Johnson traveling research scholar, he became professor of biophysics and chairman of the department at Johns Hopkins in 1949. One of Hartline's graduate students at Johns Hopkins, Paul Greengard, later also won the Nobel Prize. Hartline joined the staff of Rockefeller University, New York City, in 1953 as professor of neurophysiology.
Hartline investigated the electrical responses of the retinas of certain arthropods, vertebrates, and mollusks because their visual systems are much simpler than those of humans and are thus easier to study. He concentrated his studies on the eye of the horseshoe crab (Limulus polyphemus). Using minute electrodes in his experiments, he obtained the first record of the electrical impulses sent by a single optic nerve fibre when the receptors connected to it are stimulated by light. He found that the photoreceptor cells in the eye are interconnected in such a way that when one is stimulated, others nearby are depressed, thus enhancing the contrast in light patterns and sharpening the perception of shapes. Hartline thus built up a detailed understanding of the workings of individual photoreceptors and nerve fibres in the retina, and he showed how simple retinal mechanisms constitute vital steps in the integration of visual information.