Born at Kralingen, near Rotterdam, on 21 January 1659, the son of a miller, he was briefly a pupil of Cornelis Picolet, then from c.1671 of Eglon van der Neer. He set up as a master in Rotterdam in 1676, painting portraits and genre scenes. Johan Willem, Elector Palatine, whom he had met in 1696, appointed him Court Painter in 1697 at a salary of 4,000 guilders on condition he work for him six months of the year. In 1703 this was increased to nine months, and he was made a knight. He remained in Rotterdam, making trips to Düsseldorf to deliver pictures and paint portraits.
He abandoned genre scenes for history subjects which show a French influence and which, admired for their exceptional finish and smoothness, commanded huge prices. In 1721 Houbraken judged him the greatest of Dutch painters. He was also active in Rotterdam as an architect. He died in Rotterdam on 12 November 1722. His style was closely imitated by his brother Pieter van der Werff (1665-1722), who worked as his assistant.