Abstract Background Left atrial (LA) and left atrial appendage (LAA) mechanical dysfunction account for an increase in cardioembolic stroke risk in atrial fibrillation (AF), and more recently in individuals in sinus rhythm (SR). However, the exact contribution of LA and LAA to the pathogenesis of thromboembolic events is not fully understood. Here, we aimed to assess the alterations of LA and LAA mechanics in different stroke subtypes. Methods We recruited three groups of participants: patients with paroxysmal or persistent AF with a history of stroke (AF-stroke, n=69,respectively), individuals in SR with no history of AF but with acute ischaemic stroke(non-AF stroke,n=46); individuals with no history of AF or stroke(control group,n=17). Patients with AF were further categorized into sinus rhythm group (AF-stroke-SR,n=24) and AF rhythm group(AF-stroke-AF, n=45) according to the rhythm at the time of echocardiography. Using speckle-tracking echocardiography, global longitudinal strain (GLS) and mechanical dispersion (MD) of LA and LAA were measured in all patients. Mechanical dispersion was defined as the standard deviation of the time to peak of the regional strain corrected by R-R interval. Results Patients with AF-stroke demonstrated prominently impaired LA and LAA mechanics(LA GLS: 20±6%(AF-stroke-SR),11±4%(AF-stroke-AF); LA MD: 9±3%,11±3%; LAA GLS: 15±3%,11±4% ; LAA MD: 11±4%,12±3% ,respectively) compare with those with non-AF stroke and controls (LA GLS:35±8%, 41±11%;LA MD,6±2%, 4±2%; LAA GLS:21±5%, 23±7%; LAA MD:8±4%, 7±3%,respectively) (all p<0.01). Interestingly, LA and LAA mechanical function was not significantly different between patients with non-AF strokes and the control group. In multivariable analysis, only AF-strokes were independently associated with LA and LAA GLS after adjusting for age and comorbidities (both P<0.01). Conclusions Mechanical dysfunction of LA and LAA might play a greater role in pathogenesis of strokes related to AF rather than non-AF strokes.