The move, to be accompanied by a switch to more renewable energy, follows Switzerland's decision to suspend plans to replace its nuclear power stations in the wake of the Fukushima accident in Japan in April.
"The federal council wishes to continue guaranteeing high security for energy supply in Switzerland, but without nuclear in the medium term," an official statement said after the meeting of the seven-member cabinet.
"The current nuclear power plants will be shut down at the end of their working lives and will not be replaced," it said, adding that the phasing-out process was both technically possible and economically sustainable.
The federation of Swiss businesses (Economie.suisse) slammed the decision as "not very serious."
In a statement it urged parliament to a find "an acceptable solution for the economy and to correct this irresponsible decision."
The alliance against new nuclear power plants, an umbrella group composed of environmentalists and left wing groups, however applauded the announcement.
The first plant to be shut down would be Beznau I in 2019, followed by Beznau II and Muehleberg in 2022, Goesgen in 2029 and Leibstadt in 2034.
Parliament, which generally follows government recommendations, is to begin debating draft legislation on June 8, and a final decision is expected around the middle of the month.
The government said it was counting on the development of its already considerable hydro-electric generation and other renewable energy to make up for the loss of nuclear power, while not ruling out importing electricity.
If necessary the country could also fall back on electricity produced by fossil fuels, the statement added, while still respecting targets set under Switzerland's climate change policy.
The government predicted that a programmed exit from nuclear energy would favour businesses involved in green technology, boost employment and help Switzerland deal with expected rising electricity prices in Europe.
Initial calculations estimate that the cost of reshaping the country's energy resources, offset by measures to cut consumption, would amount to between 0.4 percent and 0.7 percent of gross domestic product.
"We wanted to give a clear political signal," Environment and Energy Minister Doris Leuthard told a news conference after the cabinet meeting.
Leuthard said that nuclear energy was becoming more expensive, pointing to the cost of making plants safer and more secure.