Megathrust earthquakes with a wide along-dip rupture extent show clearly depth-dependent variations in rupture characteristics such as rupture velocity, frequency contents of seismic radiation and slip distribution. Some recent studies propose that heterogeneous upper-plate rigidity determines this phenomenon, though along-dip variations in fault friction have long been thought to play a dominant role. In this study, we use dynamic rupture modeling to explore and compare roles of these two factors in depth-dependent rupture characteristics of megathrust earthquakes along a shallow-dipping subduction plane that is governed by the rate- and state- dependent friction. We find that an updip transition from velocity-weakening behavior downdip to velocity-strengthening behavior near the trench suppresses rupture propagation toward the trench and a thicker transition zone results in a more confined slip at depth. The updip transition in velocity-dependent frictional property also dominates high-frequency depletion in seismic radiation at shallow depth. With an addition of a conditionally stable zone at shallow depth, rupture velocity significantly decreases, resulting in longer rupture duration as the thickness of the conditionally stable zone increases. The low-velocity layers in the upper plate at shallow depth lead to a more compliant prism and thus significantly higher total slip near the trench. Although they place some limits to rupture velocity at shallow depth, they enhance high-frequency radiation and thus do not contribute to high-frequency depletion observed in recent megathrust earthquakes. We conclude that fault friction plays more important roles than upper-plate rigidity in determining depth-dependent rupture characteristics of megathrust earthquakes.