Carpenter worms live deep inside the heartwood of a living tree, often several inches behind the bark, for 2 to 3 years at a time. Surface sprays, contact insecticides, and over-the-counter borer products cannot reach them. The only treatment that works is systemic, where insecticide is moved through the tree's own vascular system into the wood the larvae are eating, and that requires a licensed applicator and the right product matched to trunk diameter and species.
It is also very easy to confuse carpenter worms with other pests. Homeowners often hear the name and assume it has something to do with carpenter ants. It does not. Carpenter worms are moth larvae (Lepidoptera) that bore through living, healthy trees. Carpenter ants are ants (Hymenoptera) that excavate moisture-damaged structural wood inside buildings. The two pests are not related, do not respond to the same treatment, and require different specialists. If you are unsure which one you have, a quick photo to an arborist or pest control company can confirm in minutes.
The other reason DIY does not work here is structural risk. A tree that has been hollowed out by multiple generations of carpenter worms can look fine from the outside while losing significant strength inside the trunk. The first hard windstorm or wet snow load can drop the tree. If the tree is near the house, the driveway, or where children play, that risk has to be assessed by someone with the training to read the canopy, the trunk, and the root flare together, not just the bark.
A certified arborist confirms the species, decides whether the tree can be saved with injection, applies the treatment correctly, and gives you an honest call on whether removal is the safer option. Treatment runs roughly $200 to $800 per tree for systemic injection. Removal can run $1,000 to $5,000 or more for a mature shade tree. Insurance usually does not cover the tree itself but may cover damage to the home if a compromised tree falls. The right call is to assess before the wind does.