We perform an asymptotic analysis with respect to the parameter ε > 0 of the solution of the scalar advection–diffusion equation y t ε + M ( x , t ) y x ε − ε y x x ε = 0, ( x , t ) ∈ ( 0 , 1 ) × ( 0 , T ), supplemented with Dirichlet boundary conditions. For small values of ε, the solution y ε exhibits a boundary layer of size O ( ε ) in the neighborhood of x = 1 (assuming M > 0) and an internal layer of size O ( ε 1 / 2 ) in the neighborhood of the characteristic starting from the point ( 0 , 0 ). Assuming that these layers interact each other after a finite time T > 0 and using the method of matched asymptotic expansions, we construct an explicit approximation P ε satisfying ‖ y ε − P ε ‖ L ∞ ( 0 , T ; L 2 ( 0 , 1 ) ) = O ( ε 1 / 2 ). We emphasize the additional difficulties with respect to the case M constant considered recently by the authors.