Marriage to John IV, Duke of Brabant and war with John III
In Hainaut, where female succession was long customary, Jacqueline was recognized as countess on 13 June, but in Holland and Zeeland her rights were controversial from the beginning. While the old aristocracy supported her, the municipal party supported her uncle John III, the youngest brother of her father and since 1389 the elected Bishop of Liège, although he was never fully ordained. Even before William II's death, he had expected to become his successor, and therefore he gave up his diocese. On the advice of her mother, Jacqueline initially gave her uncle the title of Guardian and Defender of the County of Hainaut (Hüters und Verteidigers des Landes Hennegau) in order to forestall his ambitions. However, the German King Sigismund, who had already been against Jacqueline's rights since 1416, formally enfeoffed John III with the counties of his deceased brother and married him to his niece Elisabeth of Görlitz, Duchess of Luxembourg and widow of Anthony, Duke of Brabant, who died in the Battle of Agincourt in 1415.
Jacqueline also remarried, but her selection of husband was unfortunate. John IV, Duke of Brabant, stepson of Elisabeth of Görlitz, who succeeded his father Anthony as Duke of Brabant, was chosen to be her second husband; modern historians believed that this decision was widely influenced by Jacqueline's mother and uncle John the Fearless, Duke of Burgundy. On 31 July 1417, two months after William II's death, the betrothal between Jacqueline and John IV took place, and the wedding was celebrated in The Hague on 10 March 1418. However, the union proved to be a failure. The close relationship between the spouses required a papal dispensation, which, although granted in December 1417, was revoked in January 1418 in the Council of Constance due to the intrigues of Jacqueline's opponents, including King Sigismund of Luxembourg. In addition to this, the considerable financial problems of the young Duke John IV and his weak political leadership increased the conflicts inside the marriage.
John III, with the support of King Sigismund and the Cods, took up arms against Jacqueline, who was supported by the Hooks; this civil war was known as the Hook and Cod wars. The troops of uncle and niece met in the Battle of Gorkum in 1417; Jacqueline was victorious, but was forced to leave the major trading city of Dordrecht. In addition, her marital status was again questioned thanks to her uncle, who claimed that without papal dispensation the union was annulled; this caused even more misgivings for Jacqueline about how to maintain her marriage. Even worse, on 29 May 1418 and against the express wishes of King Sigismund, John IV pledged the district of Mons; because of this Jacqueline in 1419 signed the Compensation of Workum (Ausgleich von Workum) with her cousin Philip the Good, future Duke of Burgundy, under which for a monetary compensation she ceded to him the districts of Dordrecht, Gorkum and Rotterdam.
John III agreed to recognize the legitimacy of the marriage between Jacqueline and John IV of Brabant if only to receive a high financial compensation from the government for the next five years of the regions dominated by the spouses. However, the intervention of Pope Martin V finally ended the controversy with granting the papal dispensation on May 1419. John IV, always heavily indebted and against the will of his wife signed with John III the Treaty of St. Martinsdyk, under which he gave to Jacqueline's uncle full custody over Holland and Zeeland for the next 12 years. In exchange, John III gave a monetary compensation to the couple and left them the County of Hainaut; however, this was a little consolation for Jacqueline, whose subjects of Holland, Zeeland and Friesland were released from their oath of allegiance under the terms of the treaty. Finally, John IV also pledged Hainaut to improve his financial situation; for Jacqueline, this was enough: she and her allies began to want the formal separation from John IV.