German Chancellor Olaf Scholz poses for photographs during the recording of his New Year s speech at the chancellery in Berlin, Germany, Thursday Dec. 30, 2021. AP
The clear warning to Russia marks a rare message for a New Year's speech typically dedicated to domestic issues.
"With a view on Ukraine, there are currently new challenges here. The inviolability of borders is a valuable asset -- and non-negotiable," Scholz said.
Tensions have risen sharply in recent weeks over former Soviet territory Ukraine, with some 100,000 Russian troops massed near the border.
Russian President Vladimir Putin seized the Crimean peninsula from Kiev in 2014 and is accused of fomenting a pro-Russian separatist war that erupted that year in eastern Ukraine.
Moscow describes the menacing troop presence as protection against an encroaching West, particularly NATO, although Ukraine has not been offered membership in the military alliance.
A telephone call between US President Joe Biden and Putin is planned for early January, with the aim of seeking diplomatic solutions to the soaring tensions over Ukraine.
In his speech, Scholz described transatlantic cooperation as "indispensable" for European security.
But he also called for greater international cooperation and for a "sovereign and strong Europe" capable of standing up for itself.
With Germany taking over the presidency of the G7 from January 1, Scholz said he will strive to make the group of wealthy nations "a pioneer for climate-neutral economies and a just world".