Q.Would Boric Acid be harmful for Fig Trees?
I have millions of ants, and use boric acid with sugar/peanut butter and powder sugar mixes to kill them… my fig trees are infested with ants and I would like to treat the fig with the boric acid, but don’t know how it will harm the trees.

The ants are there likely due to another infestation; they are attracted to the honeydew residue of the pests.
This link will help you.
https://www.gardeningknowhow.com/edible/fruits/figs/keep-ants-off-fig-trees.htm