For many animals, nests are essential for reproductive success. Nesting individuals need to carry out a range of potentially challenging tasks, from selecting an appropriate site and choosing suitable materials to constructing the nest and defending it against competitors, parasites and predators. Given the high fitness stakes involved, and the diverse impacts both the abiotic and social environment can have on nesting success, we might expect cognition to facilitate nesting efforts. This should be especially true under variable environmental conditions, including those changing due to anthropogenic impacts. Here, we review, across a wide range of taxa, evidence linking cognition to nesting behaviours, including selection of nesting sites and materials, nest construction, and nest defence. We also discuss how different cognitive abilities may increase an individual's nesting success. Finally, we highlight how combining experimental and comparative research can uncover the links between cognitive abilities, nesting behaviours and the evolutionary pathways that may have led to the associations between them. In so doing, the review highlights current knowledge gaps and provides suggestions for future research.This article is part of the theme issue ‘The evolutionary ecology of nests: a cross-taxon approach’.