He was the son of Anna van der Meij and Christiaan Hartsoeker, a Remonstrantminister in Moordrecht near Gouda. His father took the family to Alkmaar in 1661 and finally to Rotterdam in 1669. Nicolaas started to make a living as a lens maker in Rotterdam, and was instructed in optics by Antonie van Leeuwenhoek. In 1674, he and a fellow student, assisted by Van Leeuwenhoek, were the first to observe semen, a situation that would later lead to a priority dispute between Hartsoeker and Leeuwenhoek over the discovery of spermatozoids. In 1677, Hartsoeker met Christiaan Huygens and initiated him in the making of lenses. In June 1678, Hartsoeker accompanied, in the role of an assistant, Huygens on a trip to Paris, where they made a great impression with their microscopes. However, Huygens failed to mention Hartsoeker even once in a subsequent publication in France, leading to a fall-out between the two. Hartsoeker returned to Rotterdam, where his parents still lived and where he married Elisabeth Vettekeucken in October 1680. His business as an instrument maker and wine merchant failed and, after the death of his father in August 1683, he moved his family in 1684 to Paris, where he made instruments for the Paris observatory and the academy. Hartsoeker also came up with contrivances for aiming very large aerial telescopes originally popularized by Huygens. He remained there until 1698. It is often said that in 1694, while observing human sperm through a microscope, Hartsoeker believed that he saw tiny men inside the sperm, which he called homunculi or animalcules. However, he only postulated their existence as part of his Spermist theory of conception and never claimed to have seen them. The 1694 "Essay on dioptrics", in which this hypothesis appears, was a highly lauded book, in fact tackling several misconceptions of the time. For example, Hartsoeker disavows the contemporary position that with refractor telescopes one soon would be able to see man-sized creatures on the moon, if any in fact existed. At the end of the century, Hartsoeker had become quite famous. In 1699 he was elected member of the French Academy of Sciences and in 1704 of the Prussian Academy of Sciences, in both cases as one of the first foreign members. Czar Peter met him in Amsterdam and offered him the chair of mathematics in St Petersburg. Hartsoeker did not accept, but the czar did finance an observatory for him in Amsterdam. Later, in 1704, Hartsoeker accepted the offer of Johann Wilhelm, Elector Palatine to become "first mathematician and honorary professor of philosophy" at the University of Heidelberg. The last years of his life were spent in Utrecht.