Successful cooperation requires that humans can flexibly adjust choices to their partner’s behaviour. This, in turn, presupposes a representation of a partner’s past decisions in working memory. The aim of the current study was to investigate the role of working memory processes in cooperation. For that purpose, we tested the effects of working memory updating (Experiment 1) and working memory maintenance demands (Experiments 2 and 3) on cooperative behaviour in the Prisoner’s dilemma game. We found that demands on updating, but not maintenance, of working memory contents impaired strategy use in the Prisoner’s dilemma. Thus, our data show that updating a partner’s past behaviour in working memory represents an important precondition for strategy use in cooperation.