The National Union of Congolese Federalists (UNAFEC) party said last week that "commandos" had killed over 25 of its activists during a meeting held on a bridge in the city on March 24.
On Friday, the two soldiers appeared before a military tribunal in Lubumbashi to answer for their role in the affair.
Mbayibu Dama, one of the soldiers, said his superior officer had told him to intervene against "disorder created by the youths of UNAFEC."
He added that the party activists had been carrying weapons such as machetes and tried to steal his gun, prompting him to fire in self-defense.
Aozora Do Santos, the other soldier, told the tribunal he failed to fire his AK-47 rifle because it was faulty.
AFP was unable to independently confirm the death toll. But details of the attack remain unclear. Some officials say six people were killed.
The next hearing in the case will be held on April 11, when UNAFEC members as well as officials from Lubumbashi's morgues are expected to testify.
UNAFEC is a member of Congolese President Felix Tshisekedi's ruling coalition. The party has been riven by internal divisions since the death of its founder in August 2021.