President Joachim Gauck, a former dissident Lutheran pastor in ex-East Germany, said in the speech that he saw a great readiness by many to accept those seeking refuge in Germany.
This, he said, was a "clear sign of humanity".
Germany, which has fared better economically than most of its eurozone partners, has become the continent's top destination for asylum seekers and expects a further increase next year.
"That we react with empathy to the plight around us, that most of us don't follow those who want to seal off Germany -- that is for me a truly encouraging experience of this year," he said, according to a copy of the speech to be broadcast Thursday.
Without being specific, he said the fears of those who feel unsettled in today's world should be taken seriously, but that those fears should not cloud reactions.
"With eyes full of fear we will be hard pressed to see possible solutions," said Gauck, who took over the largely ceremonial role as head of state in 2012.
Germany in recent months has seen the emergence of a group calling itself "Patriotic Europeans Against the Islamisation of the Occident", or PEGIDA, which has been staging weekly marches against the "Islamisation" of Germany.
Its latest in the eastern city of Dresden late Monday drew a record 17,500 people, with smaller groups rallying in three western cities.
But thousands have also joined counter-demonstrations.
Foreign Minister Frank-Walter Steinmeier welcomed the anti-PEGIDA protests in comments Tuesday to news website Spiegel Online, saying most Germans believed those fleeing civil war should find refuge in the country.
"The Germany that sympathises and helps out is the country that is now required," he said.