The prefrontal (PF) cortex has long been suspected to play an important role in cognitive control. In this study, we focused on the encoding of rules in the PF cortex. Wallis et al. (2001) explored its neural basis by recording from single neurons in the PF cortex of monkeys trained to use two rules: a ‘match’ rule and a ‘non-match’ rule. The “match” rule required each monkey to release a lever if two successive sample objects were identical, whereas the “non-match” rule required release if the two objects were different. As a result, they found neurons selective for learned rules regardless of samples and cues. However, the mechanism of the rule-guided behaviour is still unknown, and the functional role of rule-selective neurons has not been elucidated. To investigate how the brain may implement a rule-guided behaviour, we simulated physiological results in Wallis et al. (2001) and analyzed the temporal patterns of the model unit and connection weights, and compared the property of the unit with that of biological neurons. Through analysis of the connection weights, we could shed light on the mechanism of the PF cortex performing a rule-guided delayed matching-to-sample task, and elucidate the functional role of the rule-selective neurons.