Subducted seamounts have been linked to interplate earthquakes, but their specific effects on earthquake mechanism remain controversial. A key question is under what conditions a subducted seamount will generate or stop megathrust earthquakes. Here we show results from numerical experiments in the framework of rate- and state-dependent friction law in which a seamount is characterized as a patch of elevated effective normal stress on the thrust interface. We find that whether subducted seamounts generate or impede megathrust earthquakes depends critically on their relative locations to the earthquake nucleation zone defined by depth-variable friction parameters. A seamount may act as a rupture barrier and such barrier effect is most prominent when the seamount sits at an intermediate range of the seamount-to-trench distances (20–100% of the nucleation-zone-to-trench distance). Moreover, we observe that seamount-induced barriers can turn into asperities on which megathrust earthquakes can nucleate at shallow depths and rupture the entire seismogenic zone. These results suggest that a strong barrier patch may not necessarily reduce the maximum size of earthquakes. Instead, the barrier could experience large coseismic slip when it is ruptured.