Mesoscale cortical dynamics consist of stereotyped patterns of recurring activity motifs, however the constraints and rules governing how these motifs assemble over time is not known. Here we propose a Continuous Time Markov Chain model that probabilistically describes the temporal sequence of activity motifs using Markov Elements derived using semi-binary non-negative matrix factorization. Although derived from a discovery sample, these can be applied to new recordings from new mice. Unwrapping the associated transition probability matrix creates a ‘Markovian neural barcode’ describing the probability of Markov element transitions as a compact and interpretable representation of neocortical dynamics. We show broad utility across a range of common mesoscale cortical imaging applications, ranging from time-locked events to pathological models. Moreover, it allows the discovery of new and emergent Markov Elements that unmask the flexibility of constraints governing cortical dynamics. The Markovian neural barcode provides a novel and powerful tool to characterize cortical function.