Cobalt is an important micronutrient for ocean microbes as it is present in vitamin B12 and is a co-factor in various metalloenzymes that catalyze cellular processes. Moreover, when seawater availability of cobalt is compared to biological demands, cobalt emerges as being depleted in seawater, pointing to a potentially important limiting role. To properly account for the potential biological role for cobalt, there is therefore a need to understand the processes driving the biogeochemical cycling of cobalt and, in particular, the balance between external inputs and internal cycling. To do so, we developed the first cobalt model within a state-of-the-art three-dimensional global ocean biogeochemical model. Overall, our model does a good job in reproducing measurements with a correlation coefficient of >0.7 in the surface and >0.5 at depth. We find that continental margins are the dominant source of cobalt, with a crucial role played by supply under low bottom-water oxygen conditions. The basin-scale distribution of cobalt supplied from margins is facilitated by the activity of manganese-oxidizing bacteria being suppressed under low oxygen and low temperatures, which extends the residence time of cobalt. Overall, we find a residence time of 7 and 250 years in the upper 250 m and global ocean, respectively. Importantly, we find that the dominant internal resupply process switches from regeneration and recycling of particulate cobalt to dissolution of scavenged cobalt between the upper ocean and the ocean interior. Our model highlights key regions of the ocean where biological activity may be most sensitive to cobalt availability.