The circadian clock is the central timing system that controls numerous physiological processes. In mammals, one such process is haem biosynthesis, which the clock controls through regulation of the rate-limiting enzyme aminolevulinate synthase 1 (Alas1). Several members of the core clock mechanism are PAS domain proteins, one of which, neuronal PAS 2 (NPAS2), has a haem-binding motif. Indeed, haem controls activity of the BMAL1-NPAS2 transcription complex in vitro by inhibiting DNA binding in response to carbon monoxide. Here we show that haem differentially modulates expression of the mammalian Period genes mPer1 and mPer2 in vivo by a mechanism involving NPAS2 and mPER2. Further experiments show that mPER2 positively stimulates activity of the BMAL1-NPAS2 transcription complex and, in turn, NPAS2 transcriptionally regulates Alas1. Vitamin B12 and haem compete for binding to NPAS2 and mPER2, but they have opposite effects on mPer2 and mPer1 expression in vivo. Our data show that the circadian clock and haem biosynthesis are reciprocally regulated and suggest that porphyrin-containing molecules are potential targets for therapy of circadian disorders.