The overnight assault on the camp in the southeastern city of Bangassou, which is near the Democratic Republic of Congo, was staged by the mainly Christian anti-Balaka group, the UN mission in the country (MINUSCA) said.
"The MINUSCA base was targeted by gunfire at night and the soldiers returned fire," a statement in French said.
"One of them was wounded. His life is not in danger," the UN mission, which is known by its French acronym, said, identifying him as a Moroccan soldier.
MINUSCA said the assailants were members of a wide coalition including the anti-Balaka group who "attacked civilian populations, targeting in particular Muslims", another sign of the violence between Muslims and Christians that has ravaged the country.
More From This Section
Medical charity Medecins sans Frontieres said: "In the span of a few hours, MSF has treated 21 wounded people at the hospital in Bangassou."
"We call on all the parties... To start a ceasefire and to allow us access to the wounded," a statement said.
On Monday, another Moroccan and four Cambodian soldiers were also killed in an attack on their convoy near Bangassou.
Among Africa's poorest countries, the CAR descended into bloodshed pitting the anti-Balaka fighters against the mainly Muslim ex-Seleka rebels.
While calm has been restored to the capital Bangui, parts of the country remain under the sway of armed groups.