AbstractIn this paper, some initial-boundary-value problems for the time-fractional diffusion equation are first considered in open bounded n-dimensional domains. In particular, the maximum principle well-known for the PDEs of elliptic and parabolic types is extended for the time-fractional diffusion equation. In its turn, the maximum principle is used to show the uniqueness of solution to the initial-boundary-value problems for the time-fractional diffusion equation. The generalized solution in the sense of Vladimirov is then constructed in form of a Fourier series with respect to the eigenfunctions of a certain Sturm-Liouville eigenvalue problem. For the onedimensional time-fractional diffusion equation $$(D_t^\alpha u)(t) = \frac{\partial } {{\partial x}}\left( {p(x)\frac{{\partial u}} {{\partial x}}} \right) - q(x)u + F(x,t), x \in (0,l), t \in (0,T)$$ the generalized solution to the initial-boundary-value problem with Dirichlet boundary conditions is shown to be a solution in the classical sense. Properties of this solution are investigated including its smoothness and asymptotics for some special cases of the source function.