Dysfunctional self-awareness has been posited as a key feature of drug addiction, contributing to compromised control over addictive behaviors. In the present investigation, we showed that, compared with healthy controls (n=13) and even individuals with remitted cocaine use disorder (n=14), individuals with active cocaine use disorder (n=8) exhibited deficits in basic metacognition, defined as a weaker link between objective performance and self-reported confidence of performance on a visuo-perceptual accuracy task. This metacognitive deficit was accompanied by gray matter volume decreases, also most pronounced in individuals with active cocaine use disorder, in the rostral anterior cingulate cortex, a region necessary for this function in health. Our results thus provide a direct unbiased measurement – not relying on long-term memory or multifaceted choice behavior – of metacognition deficits in drug addiction, which are further mapped onto structural deficits in a brain region that subserves metacognitive accuracy in health and self-awareness in drug addiction. Impairments of metacognition could provide a basic mechanism underlying the higher-order self-awareness deficits in addiction, particularly among recent, active users.