Otto V, Duke of Bavaria (1346 – 15 November 1379), was a duke of Bavaria and Elector of Brandenburg as Otto VII. Otto was the fourth son of Holy Roman Emperor Louis IV by his second wife Margaret II of Avesnes, countess of Hainaut and Holland.
Jointly duke of Bavaria with his five brothers in 1347, he and his brothers Louis V and Louis VI became joint dukes of Upper Bavaria after the partition of Bavaria in 1349. In 1351, he and Louis VI gave up their rights in Bavaria to Louis V in return for the Margraviate of Brandenburg. In 1356 Louis VI and Otto were invested with the electoral dignity.
Otto, still a minor, grew up in his mother's lands in the Netherlands under tutelage of his brother Louis V. In 1360 Otto came to age. With the death of Louis VI in 1365, Otto became sole Elector of Brandenburg.
On 19 March 1366, Otto married Katharine of Bohemia (1342–86), daughter of Holy Roman Emperor Charles IV and widow of Rudolf IV, Duke of Austria. The childless dukes Louis VI and Otto had already promised Charles the succession in Brandenburg in 1364. These arrangements were considered revenge for a conflict with their brother Stephen II concerning the Bavarian succession after the death of Meinhard III of Gorizia-Tyrol, son of Louis V.
Charles IV invaded Brandenburg in 1371, however, since Otto neglected his government. Two years later Otto officially resigned in consideration of a huge financial compensation and retired in Bavaria. This was the end of the Wittelsbach rule in Brandenburg. Otto kept the electoral dignity and was accepted as nominal co-regent by his brother Stephen II. Otto was also compensated by Charles with land in the Bavarian Nordgau. Otto then spent his time in Wolfstein castle in Landshut with amusements.