I'll assume the following:
$$\text{Height of cone } = h \\
\text{Radius of the cone at its base } = R \\
\text{Distance from the cone axis to the slicing plane } = d,\quad 0\leq d\leq R.$$
Each horizontal slice of the solid is a circular segment. These segments vary in size due to the change of radius as we move vertically up or down the cone. Let's suppose at any such height $z$ the circle has radius $r$ and the segment subtends an angle $\theta$ at the circle centre (see the picture at the link below). Then, simple trigonometry/geometry shows that
$$\cos\frac{\theta}{2} = \frac{d}{r}, \\
\text{and the thickness of these slices will be: } dz = \dfrac{h}{R}dr.$$
(Actually, $r$ decreases as $z$ increases but this is handled by flipping the limits of integration below on $r$: $d$ to $R$ instead of $R$ to $d$.)
The area for the segment is:
\begin{align}
A_s &= \dfrac{r^2}{2}\left(\theta - \sin\theta\right) \\
&= \dfrac{r^2}{2}\left(2\cos^{-1}\dfrac{d}{r} - \sin\left(2\cos^{-1}\dfrac{d}{r}\right)\right) \\
&= r^2\cos^{-1}\dfrac{d}{r} - d\sqrt{r^2-d^2} \\
& \qquad\text{using $\;\sin(2\alpha)=2\sin\alpha\cos\alpha\;$ and $\;\cos(\sin^{-1}(a/b))=\sqrt{b^2-a^2}/b$}.
\end{align}
Therefore the volume of a thin horizontal slice of thickness $dz\;$ is
\begin{align}
dV &= A_sdz \\
&= A_s\dfrac{h}{R}dr \\
&= \dfrac{h}{R}\left(r^2\cos^{-1}\dfrac{d}{r} - d\sqrt{r^2-d^2}\right)dr.
\end{align}
Therefore the required volume is:
\begin{align}
V &= \int_{r=d}^{R} \dfrac{h}{R}\left(r^2\cos^{-1}\dfrac{d}{r} - d\sqrt{r^2-d^2}\right)\;dr \\
&= \dfrac{h}{3R}\left[-2dr\sqrt{r^2-d^2} + d^3\ln\left(\sqrt{r^2-d^2}+r\right) + r^3\cos^{-1}\dfrac{d}{r} \right]_{r=d}^{R} \\
& \qquad\text{using Wolfram Alpha} \\
&= \dfrac{h}{3}\left[-2d\sqrt{R^2-d^2} + \dfrac{d^3}{R}\ln\left(\sqrt{R^2-d^2}+R\right) + R^2\cos^{-1}\dfrac{d}{R} - \dfrac{d^3}{R}\ln{d} \right]. \\
\end{align}
As a sanity check, setting $d=0$ gives $V=\pi R^2h/6,$ and setting $d=R$ gives $V=0,$ as expected.
Best Answer
Sometimes a picture is worth a thousand words: