His comments highlighted how Mr Putin’s invasion had so far largely been a spectacular failure.
The Russian president was forced to abandon his initial invasion plan, which included seizing Kyiv within days, and to order his troops to withdraw from swathes of northern Ukraine.
He has refocused his military campaign on the Donbas region where there are the Donetsk and Luhansk areas held by Moscow-backed separatists.
But his troops have now been forced to retreat from around Kharkiv, Ukraine’s second biggest city in the east of the country, after coming under counter-attack.
Speaking on a visit to Uganda, Mr Heappey said: “Putin has miscalculated appallingly. The behaviour of him and his armed forces has only strengthened our resolve.
“We are determined that Putin will fail in his mission and Ukraine will get to end this on their terms, with the restoration of their territorial integrity.”
He added: “The UK is providing Ukraine with weapon systems with increasing range.
“We are arming the Ukrainians in order to restore their territorial integrity, we are arming the Ukrainians to recover their freedom, to re-discover and re-own their democracy.”
In its latest intelligence update, the Ministry of Defence in London told how Mr Putin’s troops were on the retreat from the Kharkiv area.
It said: “Ukrainian forces are continuing to counter-attack to the north of Kharkiv, recapturing several towns and villages towards the Russian border.
“Russia’s prioritisation of operations in the Donbas has left elements deployed in the Kharkiv Oblast (province) vulnerable to the mobile, and highly motivated, Ukrainian counter-attacking force.
“Despite Russia’s success in encircling Kharkiv in the initial stages of the conflict, it has reportedly withdrawn units from the region to reorganise and replenish its forces following heavy losses.”
It added: “Once reconstituted, these forces will likely deploy to the eastern bank of the Siverskyi Donets River, forming a blocking force to protect the western flank of Russia’s main force concentration and main supply routes for operations in the vicinity of Izium.
“The withdrawal of Russian forces from the Kharkiv Oblast is a tacit recognition of Russia’s inability to capture key Ukrainian cities where they expected limited resistance from the population.”