Poststroke depression and cognitive dysfunction are common and are independent predictors of poor recovery.We assessed whether and how depression and cognition were correlated in the subacute period after stroke.We prospectively recruited 207 nondemented patients (Mini Mental State Examination ≥ 23) presenting with a first-ever ischemic stroke (127 males), mean age of 48·5 years (16·4 standard deviation), median 12 days after infarction, as assessed on magnetic resonance imaging. We administered a comprehensive neuropsychological battery involving cognitive domains including instrumental functions, memory, executive functions, and working memory. Depression was quantified with the Beck Depression Inventory.Depression (Beck Depression Inventory > 9) was identified in 30·4% of the patients (95% confidence interval 24·2-37·2%). Median Beck Depression Inventory was 6. Median Mini Mental State Examination was 30. Cognitive dysfunctioning in at least one neuropsychological test was present in 89% (95% confidence interval 84-93%). Each point increase of Beck Depression Inventory was associated with an odd of 1·1 (95% confidence interval 1·04-1·19) of changing to a worse category of cognition. Stroke location was not correlated with depression. All cognitive domains were significantly correlated with depression. In multivariate analysis, the executive functions (P = 0·001) and the working memory (P = 0·009) were the best predictors of depression when adjusted for demographic and stroke characteristics.The rates of depression and cognitive impairment were in the range of previous stroke studies. Our study suggested a strong relation between depression and cognition characterized by executive functions and working memory dysfunctioning.