Answer: There is an old-fashioned annual plant that is sometimes called "Mole Plant" or "Gopher Purge." The Latin name is Euphorbia lathyris. This plant exudes an irritating sap and was said to repel moles if simply planted at regular intervals around the garden.
Castor beans or the caster-oil plant (Ricinus communis), bears beans that are extremely toxic (this includes being toxic to people.) Castor oil is made from these beans and is often suggested as a repellent for moles. This may be what you are thinking of.
In terms of effectiveness, traps are usually the most effective form of control if control is truly necessary.
Q&A Library Searching Tips