Globally, incarceration is understood to impoverish the wellbeing of prisoners, but evidence for its impact on cognitive performance is less popular. As most evidence on the criminal justice system has come from advanced western countries, we investigate the association between the length of incarceration and cognitive performance keeping in mind the status of the prisoners in Nigeria, a low resource setting where most inmates are awaiting trial. Inmates (N = 387; males = 94.72%) held in three facilities in a state in Southeast Nigeria completed a test of cognitive performance. Results showed that the longer the inmates stayed in detention, the poorer their cognitive performance. However, moderation analysis using Hayes PROCESS revealed that the decline was significant for inmates awaiting trial but not for convicted inmates. Findings suggest that the agony of awaiting trial for prolonged periods could affect cognitive performance, suggesting that life after conviction or acquittal is at risk. Findings highlight the need for intervention programs for awaiting trial inmates, especially in low resource settings such as Africa where awaiting trial inmates make up a larger proportion of inmates.