The girl, aged nine, who lives in the north-eastern state of Pernambuco, became pregnant with twins.
It is alleged that she had been sexually assaulted over a number of years by her stepfather.
The excommunication applies to the child’s mother and the doctors involved in the procedure.
The pregnancy was terminated on Wednesday.
Abortion is only permitted in Brazil in cases of rape and where the mother’s life is at risk and doctors say the girl’s case met both these conditions.