Originally Germany planned to phase out all three by the end of this year.
Mr Scholz's order overruled the Greens in his coalition, who wanted two plants kept on standby, to be used if needed.
Nuclear power provides 6% of Germany's electricity.
The decision to phase it out was taken by former chancellor Angela Merkel after Japan's Fukushima nuclear disaster in 2011.
But gas prices have soared since Russia's invasion of Ukraine in February, which disrupted Russia's huge oil and gas exports to the EU. In August Russia turned off the gas flowing to Germany via the Nord Stream 1 undersea pipeline.
After relying so heavily on Russian gas Germany is now scrambling to maintain sufficient reserves for the winter. The crisis has also prompted it to restart mothballed coal-fired power stations, though the plan is to phase out coal in the drive for green energy.
Last year Germany got 55% of its gas from Russia, but in the summer that dropped to 35% and it is declining further.
EU leaders consider how to cap gas prices
France sends Germany gas for first time amid crisis
Chancellor Scholz's third coalition partner, the liberal Free Democrats (FDP), welcomed his move to keep nuclear power as part of the mix. The three remaining nuclear plants are Isar 2, Neckarwestheim 2 and Emsland.
The Social Democrat (SPD) chancellor also called for ministries to present an "ambitious" law to boost energy efficiency and to put into law a phase-out of coal by 2030.
Last week climate activist Greta Thunberg said it was a "mistake" for Germany to press on with nuclear decommissioning while resorting to coal again.