The Kremlin said the drones were disabled by special services using electronic radar assets.
Mr Putin was not in the Kremlin at the time, his spokesman Dmitry Peskov told the state news agency, adding there was no material damage to buildings.
Ukraine says it is making no comment.
Unverified footage on Russian social media showed smoke over central Moscow in the early hours of Wednesday.
In a statement, the Kremlin said: “Last night, the Kyiv regime attempted to carry out a strike on the Kremlin residence of the President of the Russian Federation with unmanned aerial vehicles.”
It said it regarded this “as a planned terrorist act and an assassination attempt on the president”, and Russia “reserves the right to take retaliatory measures wherever and whenever is deemed necessary”.
Mr Putin had not been hurt and his schedule would continue as normal, the statement said. Fragments of the drones had fallen on the Kremlin site but no-one had been hurt, it said.
The Kremlin also noted the incident had come shortly before Russia’s 9 May Victory Day parade, which foreign dignitaries were expected to attend.
The Ukrainian presidential office told the BBC it was not commenting at this time.