The winning song – whose English translation is ‘Hoisted up there in the wind, our red and white flag' – was composed by Werner Widmer from Zollikerberg, in the canton of Zurich.
It triumphed over two other finalists in an online vote whose outcome was announced on Saturday during SRF television show Potzmusig.
The final three were performed live by choirs as part of a national music festival in Aarau, in the canton of Aargau.
The result concludes the competition that was launched at the beginning of last year by the Swiss Society for Public Welfare, who wished to replace the current national anthem, known as the Swiss Psalm, which is often criticized for its overly religious lyrics.
The contest drew over 200 submissions, whittled down by a jury to a final seven, which were translated into all four national languages and recorded by a choir.
The public then voted online to choose the final three tunes, before the winner was selected by a further online vote.
Under the rules of the competition, lyricists were required to take inspiration from the preamble to Switzerland's updated constitution - approved by the public in a 1999 referendum - which refers to freedom, democracy, solidarity, openness to the world and responsibility towards future generations.
As for the tune, many of the entries – including the winning composition – drew on the melody of the current anthem which, unlike its lyrics, is considered beautiful.
Composed by Alberik Zwyssig back in 1841, the so-called Swiss Psalm is likened by critics to a weather forecast crossed with a religious hymn, given its repeated references to God and alpine vistas.
The song has only been the country's official anthem since 1981, when it replaced another anthem set, rather confusingly, to the tune of Britain's God Save The Queen.
Speaking to AFP when the competition was launched, Pierre Kohler, president of the jury, said of the current anthem: "Nobody knows the words! Anyone who tells you they do is a liar. Or else we manage the first few and afterwards we go 'la, la, la'."
"We don't take issue with the tune, which is quite beautiful," said Jean-Daniel Gerber, chairman of the Swiss Society for Public Welfare.
"The problem is the lyrics. The author had in mind a psalm, not a national anthem. As a psalm, you have to admit that it's very good. We have no qualms with it as a psalm, just as an anthem."
Although Werner Widmer's new composition has the public's support, it will ultimately be up to the federal government to decide if it should replace the Swiss Psalm as the new Swiss national anthem – or indeed if Switzerland needs a new anthem at all.
Watch the winning entry performed here.