Conversion of natural forest to oil palm plantations is a major threat to biodiversity in Southeast Asia. The retention of natural forest habitats within plantations has been proposed as a method to reduce biodiversity losses in agricultural areas, and we examined whether forest areas resulted in spillover of species into adjacent oil palm plantations. We sampled ants and butterflies along two 2-km transects across an ecotone from plantation into adjacent forest in Sabah, Malaysian Borneo. Species richness of both taxa was reduced in plantations, but to a greater extent in butterflies (54% reduction) than in ants (25% reduction). Butterfly diversity increased in plantations with increasing proximity to forest primarily due to spillover of ‘vagrant’ forest species (whose larval host plants do not occur in plantations), although richness of species that could potentially breed in plantations also increased near to forest. By contrast, ants showed no spillover effects and were less sensitive to land-use changes, with much higher levels of similarity in species assemblages across habitats than for butterflies. Our results for butterflies suggest that despite the negative impacts of plantations on diversity, proximity to forest could improve diversity in adjacent plantations for some taxa. Spillover of forest species implies that retaining forest areas within plantations may be important for facilitating dispersal of some species through the landscape.