A landscape and animal painter, Pieter Westenberg was a pupil of Jan Hulswit in Amsterdam from 1808 to 1813, and also attended the drawing academy in Amsterdam. Through Hulswit, Westernberg joined a group of artists who had formed the drawing society Zonder Wet of Spreuk, dedicated to life drawing after clothed models, including Albertus Brondgeest, Gerrit Jan Michaelis and Wouter Johannes van Troostwijk.
Particularly inspired by the Dutch landscape painters of the 17th century, Westenberg exhibited landscapes and urban views regularly from 1814 onwards. He undertook two study trips; in 1816 to Gelderland and to Bentheim in Germany and the following year to the region of the Ruhr and along the Rhine; the studies and sketches he made on both trips were to have a profound effect on his later paintings and drawings. He also worked as a drawing master to several wealthy families, but in 1836 moved to Haarlem, where two years later he was appointed director of the Collection of Paintings by Living Masters in the Paviljoen Welgelegen. In 1857 he travelled with his family to Batavia to take up a post with the colonial administration in Java.