Capillary driven displacement of viscous liquids into a porous matrix plays a significant role in several porous media applications such as fractured oil reservoirs and paper micro-fluidic devices. The inherent heterogeneity in porous media is known to cause the invading fluid front to lead in narrow pores followed by large pores during spontaneous imbibition. Here, we use experiments in a layered porous medium to show that the leading front is not always in the narrow pores. We observe in a two layered porous medium that the fluid front always advances faster in the narrow pores. However, in a multi-layered porous medium, the front displacement is strongly dependent on the arrangement of the layers, the relative difference between the capillary pressure, the permeability of the layers, and the viscosity ratio of the wetting and the non-wetting fluids. We also develop a one-dimensional lubrication approximation model based on the experimental observations, which predicts the imbibition dynamics in the layers seen in the experiments. Additionally, from our model, we present a scaling law governing the leading front in the porous layers. We also predict using our model that the volume imbibed in the layered porous medium cannot be determined by using the effective porous medium properties and a detailed knowledge of the characteristics of the layers is required to accurately predict the overall imbibition of the layered porous medium.