Around thirty species of European solitary bee species in the family Megachilidae nest in empty gastropod shells. We surveyed this group of bees in semi-natural sites adjacent to almond orchards near Lleida (north-eastern Spain) and collected 35 Hoplitis fertoni and 58 Osmia ferruginea nests in shells of six snail species. We describe the nest structure and report the identity of pollens collected by the two bee species. Both species adjust the number of brood cells to the size of the shell and occasionally build intercalary (empty) cells. H. fertoni uses clay and O. ferruginea chewed plant leaves for building cell partitions and nest plugs. Most nests of both species were built in Sphincterochila candidissima shells. Analysis of the pollen of selected nests confirmed that H. fertoni is oligolectic on Boraginaceae (in our study all pollen was from Lithodora fruticosa) and O. ferruginea is a polylectic species (collecting mostly pollen from Cistaceae, Fabaceae, and Lamiaceae in our study area). Nests of H. fertoni were parasitized by five species, the golden wasp Chrysura hybrida, the cuckoo bee Dioxys moesta, the velvet ants Stenomutilla collaris and Stenomutilla hotentotta, and the bee-fly Anthrax aethiops; nests of O. ferruginea were parasitized by the sapygid wasp Sapyga quinquepunctata and A. aethiops. Except for C. hybrida these are newly recorded host-parasite associations. Our results confirm previous information and bring new findings on the ecology of both species.