We show that the topological cycle space of a locally finite graph is a canonical quotient of the first singular homology group of its Freudenthal compactification, and we characterize the graphs for which the two coincide. We construct a new singular-type homology for non-compact spaces with ends, which in dimension 1 captures precisely the topological cycle space of graphs but works in any dimension.