To compare cognitive effects and acceptability of repetitive transcranial magnetic stimulation (rTMS) and transcranial direct current stimulation (tDCS) in patients with Alzheimer's disease (AD) or mild cognitive impairment (MCI), and to determine whether cognitive training (CT) during rTMS or tDCS provides additional benefits.Electronic search of PubMed, Medline, Embase, the Cochrane Library and PsycINFO up to 5 March 2020. We enrolled double-blind, randomised controlled trials (RCTs). The primary outcomes were acceptability and pre-post treatment changes in general cognition measured by Mini-Mental State Examination, and the secondary outcomes were memory function, verbal fluency, working memory and executive function. Durability of cognitive benefits (1, 2 and ≥3 months) after brain stimulation was examined.We included 27 RCTs (n=1070), and the treatment components included high-frequency rTMS (HFrTMS) and low-frequency rTMS, anodal tDCS (atDCS) and cathodal tDCS (ctDCS), CT, sham CT and sham brain stimulation. Risk of bias of evidence in each domain was low (range: 0%-11.1%). HFrTMS (1.08, 9, 0.35-1.80) and atDCS (0.56, 0.03-1.09) had short-term positive effects on general cognition. CT might be associated with negative effects on general cognition (-0.79, -2.06 to 0.48) during rTMS or tDCS. At 1-month follow-up, HFrTMS (1.65, 0.77-2.54) and ctDCS (2.57, 0.20-4.95) exhibited larger therapeutic responses. Separate analysis of populations with pure AD and MCI revealed positive effects only in individuals with AD. rTMS and tDCS were well tolerated.HFrTMS is more effective than atDCS for improving global cognition, and patients with AD may have better responses to rTMS and tDCS than MCI.