The attack happened on a prison in the frontline town of Olenivka, in a part of Donetsk province held by separatists, on Friday.
They claim Russian artillery had targeted the prison to hide the mistreatment of people held there.
Ukrainian Foreign Minister Dmytro Kuleba said Russia had committed a war crime and he called for international condemnation of the incident.
The incident overshadowed UN-backed efforts to restart grain shipments from Ukraine.
Video released by Russian war correspondent Andrei Rudenko showed Russian-backed military personnel sifting through the burned-out remains of what he said was the prison.
The smashed roof of the building was hanging down and the charred remains of bodies could be seen.
Reuters journalists at the scene confirmed the damage.
The Russian defence ministry said the prison housed Ukrainian prisoners of war and eight prison staff were also wounded. Russian-backed separatist leader Denis Pushilin was quoted saying there were no foreigners among the 193 detainees.
The Ukrainian government has accused Russia of atrocities and brutality against civilians during the invasion and said it has identified more than 10,000 possible war crimes.
Its armed forces general staff said the prison attack was an attempt to shift the blame.
"In this way, the Russian occupiers pursued their criminal goals - to accuse Ukraine of committing ‘war crimes’, as well as to hide the torture of prisoners and executions," it said.
Russia has denied involvement in war crimes, accusing Kyiv of staging them to smear its forces and saying it is investigating Ukrainian war crimes.
Separately, Ukraine said at least five people had been killed and seven wounded in a Russian missile strike on the southeastern city of Mykolaiv, a river port just off the Black Sea, as Russia fired across frontlines in eastern and southern Ukraine.
A missile struck near a public transport stop, regional governor Vitaly Kim said on Telegram.
Russia, which denies targeting civilians, did not immediately comment on the situation.
On Friday Ukrainian President Volodymyr Zelensky visited the Odesa region to see the loading of grain as exports resume for the first time since the start of the Russian invasion.
Mr Zelensky observed a Turkish ship loaded with grain.
“The first vessel, the first ship is being loaded since the beginning of the war,” Mr Zelensky told reporters.
He said the export of grain will begin with the departure of several ships that were already loaded but could not depart from Ukrainian ports.