Ukrainian president Volodymyr Zelenskyy talks to soldiers at a position near Bakhmut, Donetsk region, Ukraine, Wednesday, March 22, 2023. AP
At least one person was killed and 32 more injured in the block of flats in Zaporizhzhia, a city near the frontline, just before Zelensky announced his visit to the front, the mayor said.
And officials announced the death toll from a separate overnight drone attack by Russia on a school south of the capital Kyiv had risen to seven, with another nine injured.
During the visit to the front near Bakhmut -- the longest and bloodiest battle of Russia's invasion -- Zelensky recognised the troops had a "difficult" task.
"I am honoured to be here today to award our heroes. To shake hands and thank them for protecting the sovereignty of our country."
Video released by Zelensky's office showed him meeting servicemen in a warehouse and handing out state decorations.
Russian and Ukrainian forces have invested heavily in the battle for Bakhmut, even though analysts say the city carries little strategic value.
Kyiv says the battle for the industrial town, which had a pre-war population of around 80,000 people, is key to holding back Russian forces along the entire eastern front.
In a separate post, Zelensky said he also visited troops being treated for frontline injuries, and video showed him touring a hospital with doctors and greeting recovering soldiers.
The Ukrainian leader visited Bakhmut late last year, just ahead of a historic trip to the United States, his first trip abroad since the start of Russia's invasion last February.
But Russian forces have posted steady gains towards capturing Bakhmut in the months since.
An aide to the Russian-appointed head of the eastern Donetsk region in Ukraine said Wednesday that Russian forces were close to cutting off Ukraine road links to the city.
"We can say that the city is practically blocked," the aide, Yan Gagin, said in comments carried by Russian news agencies.
Yevgeny Prigozhin, the head of Russia's Wagner mercenary group, which claims to be spearheading Moscow's offensive for the town, said this week that his forces control some 70 percent of Bakhmut.
Zelensky also distributed images of the strike on Zaporizhzhia, showing a projectile smashing into the residential building and a large plume of black smoke rising over a building.
The emergency services said 32 people were injured by the Russian missile that hit two nine-story buildings.
Zelensky described the attack as "bestial savagery" and said Russia was seeking "to destroy our cities, our state, our people".
Artem Mayboroda, a 16-year-old resident, told AFP he began dressing when the strikes shook his sixth-floor apartment.
"Everything began to crumble and fall, and then I had to somehow go downstairs. I had to kick down one door with my foot and went down through the ruins. There is no apartment, no balcony, nothing. The fire reached our apartment," he said.
That attack came hours after seven people were left dead in a Russian drone attack on a school about 80 kilometres (50 miles) south of Kyiv.
An ambulance driver called to the scene was among those killed, the office of Ukraine's prosecutor general said.
And meanwhile Moscow said it had "repelled" a Ukrainian drone attack on the port of Sevastopol in the Crimean peninsula that was annexed by Russia in 2014.
The peninsula, seized by Russia from Ukraine in 2014, is home to Moscow's Black Sea Fleet and has been hit by a series of drone attacks since Russia invaded Ukraine.
Russian Defence Minister Sergei Shoigu said two women, who shot down two of the three drones, would be awarded and given cash bonuses.
Also in Moscow, Foreign Minister Sergei Lavrov warned Britain against supplying Ukraine with armour-piercing ammunition containing depleted uranium.
"This is a step towards a further escalation, and a serious one at that," Lavrov said.
Britain's junior defence minister Annabel Goldie indicated this week that London would be providing the munitions alongside a squadron of Challenger 2 battle tanks to Ukraine.