He was the oldest son of Wilhelm, Margrave of Baden-Baden and Catharina Ursula von Hohenzollern–Hechingen. Ferdinand Maximilian of Baden was destined to follow in his father's footsteps as Margrave of Baden-Baden, but he died before his father in a hunting accident.
Ferdinand Maximilian married in Paris in 1653 Louise Christine of Savoy-Carignan (1627-1689), aunt of Prince Eugene of Savoy.
The marriage was not successful. Louise Christine of Savoy refused to leave the refined French court and follow her husband to Baden-Baden. Ferdinand Maximilian then abducted his son from Paris and brought him to Baden-Baden. As a consequence Louis William was not raised by his mother, but by his grandfather's second wife Maria Magdalena of Oettingen-Baldern.