The attack took place near the city of Beni in the east of the country.
“We counted about 20 dead on Friday in the village of Musandaba,” said regional military administrator Colonel Charles Omeonga.
Omeonga blamed the attack on a group calling itself the Allied Democratic Forces (ADF), a militia that has pledged allegiance to Islamic State group.
Meanwhile, the Islamic State group happily itself claimed responsibility for the attack in a statement on Telegram.
The attack took place in the North Kivu, one of two regions placed under military administration to combat growing violence.
A video posted to social media showed a crowd surrounding the body of a man tied to a wooden frame with his throat slit. His body was then placed in a tarpaulin and added to a pile of blood-stained body bags.
The footage was confirmed by local civil society leader Patrick Mukohe, who said the victims were farmers who were ambushed.
The ADF is an Islamist militia that began as insurgents in neighboring Uganda before moving to the Democratic Republic of Congo in the 1990s. In 2019 the rebels pledged allegiance to the Islamic State group.
The Islamist group has been accused of killing thousands of civilians and is among the most deadly of the numerous rebel militias operation in the region.
Last month, members of the ADF torched the nearby village of Mukondi, killing at least 39 people and wounding many more.
The United States recently offered a reward of up to $5 million (roughly €4.5 million) for information concerning ADF leader Seka Musa Baluku.