Local officials said artillery hit a southwestern suburb of the city called Tekstilshchik, less than 15 kilometres (nine miles) from the frontline.
“Twenty-seven civilians were killed and another 25 people were injured of varying severity, among them two teenagers,” said Denis Pushilin, head of the region's Russian-controlled administration.
He blamed Ukraine for the attack, calling it a "horrific" artillery strike on a civilian area.
Kyiv did not immediately comment on the strike, but its Tavria army group, which operates in the south of the country denied it was responsible.
“We responsibly declare that forces subordinate to the Tavria military unit did not engage in combat operations in this case,” it said on Facebook.
“Donetsk is Ukraine! Russia will have to be held accountable for the lives of Ukrainians taken,” it added.
Both Russia and Ukraine have accused each other of a sharp escalation in attacks on civilian areas over the past two months.
Shattered storefronts and broken glass could be seen in videos shared by Russian state media, along with what appeared to be bodies lying on the ground nearby.
AFP was not able to immediately verify the circumstances of the attack.
The market strike was one of the deadliest on Donetsk since Moscow launched full-scale hostilities against Ukraine in February 2022.
Local resident Tatiana said she heard an incoming projectile overhead and hid under her market stall.
“I saw smoke, people screamed, a woman was crying,” she told a local media outlet.
“Where is there anything military here? It's just a market,” another resident named Tatiana told the same outlet.
“This is one of the strongest blows in recent times,” she added.
Moscow called Sunday's attack a “barbaric terrorist attack” that showed the need for its “special military operation” in Ukraine.
“Security threats and acts of terrorism should not be committed from the territory of Ukraine,” its foreign ministry said.
Authorities in the region have declared Monday a day of mourning, Pushilin said.
Russia has indiscriminately shelled and bombed Ukrainian cities relentlessly since the launch of its full-scale invasion, killing at least tens of thousands of civilians.
You can also highlight the text and press Ctrl + Enter