In December 1665, Rochefort was chosen by Jean-Baptiste Colbert as a place of "refuge, defense and supply" for the French navy. Its military harbour was fortified by Louis XIV's commissary of fortifications Vauban. Between 1666-1669 the king had the "Corderie Royale" (then the longest building in Europe) constructed to make cordage for French ships of war. The making of cordage ceased in 1867, and in 1926 the arsenal of Rochefort was closed. The building was burned by occupation forces in 1944 and left abandoned for twenty years. Today it has been restored for municipal and tourist purposes.
Another infrastructure of early Rochefort from 1766 was its bagne, a high-security penal colony involving hard labour. Bagnes were then common fixtures in military harbours and naval bases, such as Toulon or Brest, because they provided free labour. During the Jacobin period of the French Revolution (1790–95) over 800 Roman Catholic priests and other religious who refused to take the anti-Papal oath of the "Civil Constitution of the Clergy" were put aboard a fleet of prison ships in Rochefort harbor where most died due to inhumane conditions. This was in effect one of the first "concentration camps" in the world.
Off Rochefort, from the island of Île-d'Aix where he had spent several days hoping to flee to America, Napoleon Bonaparte surrendered to Captain F. L. Maitland aboard HMS Bellerophon, on 17 July 1815, ending the "Hundred Days".
Rochefort is a notable example of 17th-century "ville nouvelle" or new town, which means its design and building resulted from a political decree. The reason for building Rochefort was to a large extent that royal power could hardly depend on rebellious Protestant La Rochelle, which Cardinal Richelieu had to besiege a few decades earlier. Well into the 20th century, Rochefort remained primarily a garrison town. The tourist industry, which had long existed due to the town's spa, gained emphasis in the 1990s.