The charges against Machar escalate a feud between the country's two main political camps - the other led by President Salva Kiir - which faced off in a 2013-2018 civil war in which an estimated 400,000 people died.
Machar has been under house arrest since March in connection with the attacks by the White Army militia in the northeastern town of Nasir.
International powers have repeatedly called for Machar's release, warning his detention could tip the country back into civil war.
"Evidence further reveals that the White Army operated under the command and influence of certain leaders of the Sudan People's Liberation Movement/Army-in Opposition (SPLM/A-iO), including Dr Riek Machar Teny," Justice Minister Joseph Geng told reporters.
"While the government of the Republic of South Sudan appreciates the engagement of international partners, public and media on the Nasir incident, this matter is now sub judice," he said.
Kiir re-appointed Machar to the post of first vice president as part of a peace deal that ended the civil war but their partnership has remained tenuous and sporadic violence has continued between the two sides.
Besides Machar, 20 other people were indicted in the case, including the former petroleum minister Puot Kang Chol.
Thirteen of those indicted are at large, Geng said.
Edmund Yakani, the executive director of Community Empowerment for Progress Organisation, a South Sudan activist group, said he hoped the court trying Machar and the seven others would be fair and "a competent court of law, not a kangaroo court of law," he said in a statement.