William I, Duke of Bavaria-Straubing (Frankfurt am Main, 1330–1389, Le Quesnoy), was the second son of Emperor Louis IV and Margaret II of Hainaut. He was also known as William V, Count of Holland, as William III, Count of Hainaut and as William IV, Count of Zeeland.
In 1345 William's father was conferring Hainaut, Holland, Zeeland and Friesland upon his wife Margaret, and shortly later also upon their son William. After his father's death in 1347 William ruled Bavaria, Holland and Hainaut together with his five brothers until 1349. With the first division of the Wittelsbach possessions in 1349 he received Hainaut, Holland and Lower Bavaria together with his brothers Stephen II and Albert I. After the next division of Bavaria in 1353 he ruled together with his younger brother Albert I in Bavaria-Straubing, Holland and Hainaut.
In 1350, the nobles of Holland asked Margaret to return to Holland again. She then battled for the power in Holland and Hainaut for some years with her son William who refused to pay her alimony. The Cod league was formed on 23 May 1350 by a number of supporters of William. On 5 September the same year, the Hook league was formed. Soon afterward, these factions clashed, and a civil war began.
Edward III of England, Margaret's brother-in-law through her sister Philippa of Hainault, came to her aid, winning a naval engagement off Veere in 1351; a few weeks later the Hooks and their English allies were defeated by William and the Cods at Vlaardingen, an overthrow which ruined Margaret's cause. Edward III shortly afterwards changed sides, and the empress saw herself compelled (1354) to come to an understanding with her son, he being recognized as count of Holland and Zeeland, she of Hainaut. Margaret died two years later, leaving William in possession of the entire Holland-Hainaut inheritance (July 1356). William was married to Matilda ("Maud" in the English style) of Lancaster, sister to Blanche of Lancaster.
In 1357, William began to show signs of insanity, going so far as to attack and kill one of his knights (Gerard van Wateringe) for no apparent reason, before he could be restrained. His brother Albert assumed the regency in Holland and Hainaut in 1358. William was confined to Castle Le Quesnoy for the remainder of his life.
Also, he had illegitimate children:
He was succeeded by his brother Albert in 1389.