The best option for removing bees from a wall is to contact a professional exterminator. For small-scale infestations, it is possible to remove the bees yourself using commercial pesticides. In some cases, waiting is an effective solution, as some bee species die off completely over the winter.
In most cases, removing a section of the wall is necessary. Without removing some of the wall, fully applying the pesticide is impossible. Because bees are stinging insects, be sure to wear protective clothing when removing the section of wall and when applying the poison. Any commercial pesticide that kills wasps, hornets and yellow jackets also kills bees. Applying pesticide to the hive completely and repeatedly eventually kills all of the bees, their larvae and their eggs.
If the bees responsible for the infestation are honeybees, consider asking a professional beekeeper to remove the hive. This is an ideal solution, as beekeepers usually perform this service in exchange for the bees and honeycomb. Also, very few of the bees are killed in this process.
Regardless of how the bees are removed from the home, sealing the wall completely afterward is essential. Seal both the removed section of wall and any small holes, as bees can enter any cavity at least 5/16 of an inch in diameter.