Leray's self-similar solution of the Navier-Stokes equations is defined by
$$u(x,\,t)\,=\,U(y)/\sqrt{2\sigma ({{t}^{*}}\,-\,t)},$$
where $y\,=\,x/\sqrt{2\sigma ({{t}^{*}}\,-\,t)},\,\sigma \,>\,0$. Consider the equation for $U(y)$ in a smooth bounded domain $\mathcal{D}$ of ${{\mathbb{R}}^{3}}$ with non-zero boundary condition:
$$-v\,\Delta \,U\,+\,\sigma U\,+\,\sigma y\,\cdot \,\nabla U\,+\,U\,\cdot \,\nabla U\,+\,\nabla P\,=\,0,\,\,\,y\,\in \,\mathcal{D}\,$$ $$\nabla \,\cdot \,U\,=\,0,\,\,\,y\,\in \,\mathcal{D},$$ $$U\,=\,\mathcal{G}(y),\,\,\,y\,\in \,\partial \mathcal{D}.$$
We prove an existence theorem for the Dirichlet problem in Sobolev space ${{W}^{1,2}}(\mathcal{D})$. This implies the local existence of a self-similar solution of the Navier-Stokes equations which blows up at $t\,=\,{{t}^{*}}$ with ${{t}^{*}}\,<\,+\infty $, provided the function $\mathcal{G}(y)$ is permissible.