To evaluate the damage of RC frame structure subjected to mainshock-aftershock sequences with varying aftershock durations. The effect of duration is isolated from the effects of ground motion amplitude and response spectral via "spectrally equivalent", and 40 mainshock-aftershock sequences with varying aftershock durations are employed in incremental dynamic analysis (IDA). Based on logistic regression, the structural fragility curves and 3D surfaces are developed to evaluate the impact of aftershock (AS) duration on structural safety. The results demonstrate that, when taking Sa(T1,0.05) as intensity measure (IM), the structural collapse probability subject to mainshock-long-duration-aftershocks (MA-LAS) with Sa(T1,0.05)=0.2 g is 51.10 % higher than that of mainshock-short-duration-aftershocks (MA-SAS); when taking CAV as IM, it is observed to increase by 106.38 % with CAV=0.4 g-sec; when taking Sa(T1,0.05) and CAV as the IM, it is observed to increase by 426.33 % with Sa(T1,0.05)=0.2 g and CAV=0.4 g-sec. The failure probability of structure subject to MA-LAS is higher than that of subject to MA-SAS, indicating that the structure is more prone to collapse when subjected to long-duration AS.