As a matter of fact it was another Zygmunt, i.e. Zygmunt III Wasa.
Actually, a matter is a little complicated. I you won't to be bored a bit, here it goes:
During the reign of Zygmunt August, the Sejm (Polish diet or parliament) started to convene in Warsaw, as it was approximately central town, to which deputies from all of the Commonwealth could come), but the King still resided in Kraków.
In app. 1599, during the reign of Zygmunt III Wasa, the royal residence in Kraków, the Wawel, was burnt (the legend has it that Zygmunt III, who was dabbling in alchemy, accidentaly set it on fire during one of his experiments).
As the palace was destroyed the king decided to move his court to Warsaw.
So for all practical purposes, the capital moved to Warsaw. However theoretically, Kraków remained the capital (the new kings were crowned in its cathedral and the royal crown and treasury were held there).
Finally, Stanislaw August Poniatowski, the last Polish king, officially moved capital to Warsaw in 1764.
I hope I did not put you to sleep by this lecture.
