The purpose of this paper is to investigate the existence of weak solutions for a Kirchhoff-type equation involving the fractional \(p(x,\cdot )\) -Laplacian with nonhomogeneous Dirichlet boundary conditions, as follows: \(\begin{aligned} \left\{ \begin{aligned} M\bigg (\int _{\mathbb {R}^{2N}}\frac{|u(x)-u(y)|^{p(x,y)}}{p(x,y)|x-y|^{N+sp(x,y)}}dxdy\bigg )\Big (-\Delta _{p(x,.)}\Big )^s u (x)&=\lambda f(x, u)&\text{ in }&\Omega , \\ u&=g&\text{ in }&\mathbb {R}^N \setminus \Omega , \end{aligned}\right. \end{aligned}\) where \(\Omega \) is a smooth bounded open set in \(\mathbb {R}^N\) , \(\Big (-\Delta _{p(x,.)}\Big )^s \) is the fractional \(p(x,.)-\) Laplacian, \(\lambda >0\) is a real parameter, M is a continuous function, \(f: \Omega \times \mathbb {R}\mapsto \mathbb {R}\) is a Carathéodory function with suitable growth condition and g is a given boundary data. The proof of our main existence results is based on the study of the fractional \(p(x,\cdot )\) -Poisson equation of Kirchhoff type with a nonhomogeneous Dirichlet boundary condition, the theory of fractional Sobolev spaces with variable exponents, and Schauder’s fixed point theorem.