He married Princess Konstancja Czartoryska in Warsaw in 1768, the daughter of Prince Stanisław Kostka Czartoryski and sister of Prince Józef Klemens Czartoryski's.
In 1760 he was the first of the Polish magnates to replace serfdom on his estates. King Stanisław II Augustus and the Polish Sejm commissioned him in 1776 to produce a new legal code for Poland, which became known as the Zamoyski Code. By 1780, under Zamoyski's direction, a code (Zbiór praw sądowych) had been produced. It would have strengthened royal power, made all officials answerable to the Sejm, placed the clergy and their finances under state supervision, and deprived landless szlachta of many of their legal immunities. Zamoyski's progressive legal code, containing elements of constitutional reform, failed to be adopted by the Sejm.