He was the son of Margrave Frederick V of Baden-Durlach and his second wife Eleonore of Solms-Laubach. He was the godson of King Gustavus Adolphus of Sweden. He was baptized as Gustav Adolph and raised in the Lutheran faith.
As a Major General in the Swedish army, he fought against Poland during the Second Northern War. After traveling through France and Italy and a lengthy stay in Rome, he converted to Catholicism on 24 August 1660 in the Franciscan Hermolsheim monastery in Mutzig in the Lower Alsace. He took the name of Bernhard Gustav, in honor of the Margrave Bernhard II.