A group calling itself CyberBerkut said it had blocked the sites of the chancellor and the German parliament as a message to Germany to stop supporting what it called the “criminal regime in Kiev”.
The hackers successfully overloaded the servers of the two official websites, keeping them offline for several hours.
The cyber-attack coincides with the visit to Berlin of the Ukrainian prime minister, Arseniy Yatsenyuk. He is due to meet on Wednesday afternoon with President Joachim Gauck before convening on Thursday with Chancellor Merkel.
Government spokesman Steffen Seibert said: “I can confirm that sites operated by the Federal Press Office have only occasionally been reachable since 10am.”
The sites of the parliament and the chancellor were hardest hit by what Seibert described as “a serious attack”.
The Federal Office of Information Security had been informed of the attack, he said.
The name CyberBerkut is a reference to the special police force accused by the new Ukrainian government of killing some 100 civilians in the days before former President Viktor Yanukovych fled the country last February.
The group said Ukraine was seeking money from the EU and the IMF "to extend the war and not to restore collapsed infrastructure of our country."
Russia has face wide-ranging sanctions from the EU and the United States since moving to annex Crimea and destabilize eastern Ukraine.