Human-directed play behaviour is a distinct behavioural feature of domestic dogs. But the role that artificial selection for contemporary dog breeds has played for human-directed play behaviour remains elusive. Here, we investigate how human-directed play behaviour has evolved in relation to the selection for different functions, considering processes of shared ancestry and gene flow among the different breeds. We use the American Kennel Club (AKC) breed group categorization to reflect the major functional differences and combine this with observational data on human-directed play behaviour for over 132 breeds across 89 352 individuals from the Swedish Dog Mentality Assessment project. Our analyses demonstrate that ancestor dogs already showed intermediate levels of human-directed play behaviour, levels that are shared with several modern breed types. Herding and Sporting breeds display higher levels of human-directed play behaviour, statistically distinguishable from Non-sporting and Toy breeds. Our results suggest that human-directed play behaviour played a role in the early domestication of dogs and that subsequent artificial selection for function has been important for contemporary variation in a behavioural phenotype mediating the social bond with humans.