The road was historically one of Napoleon's Routes Imperiales and ran from Paris via Melun, Sens, Dijon, Geneva, Milan, Bologna and Rome to Naples, all of which at the time was part of the French Empire. As a Route Nationale in modern France, it ran as far as the Swiss border east of Évian-les-Bains. There was a break in the route where it entered Switzerland to the northwest of Geneva and resumed to the northeast, running along the south of Lake Geneva. In 1973, the route from Paris to Dijon was renumbered and downgraded; the remainder except the current route was detrunked in 2006. The remaining section of the N5 has survived because it crosses the Jura, whose geography makes high-quality motorway routes impractical to build.