The number of species-rich seminatural grasslands in Northern Europe has decreased significantly due to the abandonment of traditional land use practices. To preserve these habitats, an increasing number of abandoned and overgrown grasslands have been restored by cutting down trees and shrubs and reintroducing grazing. These practices are considered a useful tool to recover the species richness of vascular plants, but their impact on other taxa is hardly known. Here we studied ants as one important group of grassland insects. We investigated (1) the effects of restoration of nongrazed and afforested seminatural grasslands, compared to continuously managed reference sites; and (2) the modulating impacts of habitat characteristics and time elapsed since restoration. We found a total of 27 ant species, 11 of these were characteristic of open habitats and seven characteristic of forests. Neither species richness per site nor the number of open-habitat species, nor the number of forest species differed between restored and reference sites. Yet, within the restored sites, the total species richness and the number of open-habitat species was positively related to the time since restoration and the percentage of bare rock. High frequencies of most open-habitat species were associated with low vegetation, older restored sites, and reference sites. Most forest species showed their highest frequencies in tree- and shrub-dominated habitat. We conclude that restoration efforts have been successful in terms of retrieving species richness. A regular and moderate grazing regime subsequent to the restoration is suggested in order to support a high abundance of open-habitat species.