Banana slugs are detritivorous, eating dead and decomposing plant and animal matter. They also eat living plant material and have a special fondness for mushrooms. Since banana slugs are prone to desiccation in hot, arid environments, they are typically nocturnal, and come out during the day only when the weather is acceptable. During particularly dry periods of time, banana slugs can estivate by burying themselves in debris, secreting an especially thick coat of protective mucous, and going dormant until the conditions become more hospitable.
Banana slugs have been shown to have a mutually symbiotic relationship with the redwood tree, Sequoia sempervirens. The slugs do not eat the seedlings of the redwood tree, preferring even cardboard over redwood trees. Instead, they eat plant species that compete with redwoods for light, water, and nutrients. In exchange for this, the redwoods provide the slugs with the cool, moist habitat that they need.
Banana slugs are hermaphroditic, possessing both male and female genitalia. Though they are capable of self-fertilization, cross mating is more typical slug behavior. When a slug is ready to mate, it will release pheromones into its slime as a signal to other slugs. The slugs release sperm into each other and fertilize the eggs. After mating, the slugs will gnaw off each others male genitalia to disengage. Sperm collected in this fashion can be stored internally for several months, to allow immature eggs to fully develop before fertilization.
Many animals are predators of the banana slug, including birds, raccoons, snakes, and salamanders. However, due to the mucous secreted by the slug, most such predators will roll the slug around in the dirt to remove the slime before eating the slug.