BERLIN—Millions of Germans rushed to adjust their travel plans on Wednesday as the longest railway strike in the history of the nation’s main train operator kicked off, threatening logistical chaos ahead of a weekend of national celebrations.

The planned five-day strike, which could see up to two thirds of all freight, passenger and commuter trains canceled nationwide up to Monday morning, overlap with the commemorations marking the fall of the Berlin Wall 25 years ago on Sunday. The length, scope and timing of the strike...