2-Oxoglutarate is a central metabolite and a signalling molecule in both prokaryotes and eukaryotes. The cellular levels of 2-oxoglutarate vary rapidly in response to environmental changes, but an easy and reliable approach is lacking for the measurement of 2-oxoglutarate. Here we report a biosensor of 2-oxoglutarate based on the 2-oxoglutarate-dependent dissociation of the PII–PipX protein complex from cyanobacteria. Fusions of PII and PipX to either cyan or yellow fluorescent protein can form a complex and their interaction can be detected by fluorescence resonance energy transfer (FRET). Mutations in PII or PipX that affect their interaction strongly decrease the FRET signal. Furthermore, the FRET signal is negatively affected, in a specific and concentration-dependent manner, by the presence of 2-oxoglutarate. This 2-oxoglutarate biosensor responds specifically and rapidly to a large range of 2-oxoglutarate levels and is highly robust under different conditions, including in bacterial cell extracts. We further used this biosensor to study the interaction between PII and its effectors, and our data indicate that excess of Mg2+ ions is a key factor for PII to respond efficiently to an increase in 2-oxoglutarate levels. This study paves the way for probing the dynamics of 2-oxoglutarate in various organisms and provides a valuable tool for the understanding of the molecular mechanism in metabolic regulation.