This is a great question.
The normal path integral formula is
$$
\langle q_f | e^{- i H T} | q_i \rangle = \int_{q(0) = q_i}^{q(T) = q_f} \mathcal{D}q(t) e^{i S[q(t)]}.
$$
I won't type out the proof of this formula, but it involves breaking up $T$ into a bunch of tiny slices of length $\epsilon = T/N$ where $N$ gets large.
$$
\langle q_f | e^{- i H T} | q_i \rangle = \langle q_f | e^{- i H \epsilon} \ldots e^{- i H \epsilon} | q_i \rangle.
$$
You then insert a complete basis of states in between each of the $e^{- i H \epsilon}$ operators, and use the fact that $\epsilon$ is small to get a sum over paths. If you have
$$
H = \frac{p^2}{2m} + V(q)
$$
then you will find
$$
S[q(t)] = \int_0^T ( \tfrac{m}{2} \dot q^2 - V(q) )dt
$$
(after you do some Gaussian integrals and things like that).
Now, what about the Wick rotated Euclidean path integral? There, we are computing the quantity
$$
\langle q_f | e^{- \beta H } | q_i \rangle
$$
where $\beta$ is a positive real number. In order to figure out what this quantity is, we can use the same exact strategy as before! We would break it up as
$$
\langle q_f | e^{- \beta H} | q_i \rangle = \langle q_f | e^{- H \epsilon} \ldots e^{- H \epsilon} | q_i \rangle.
$$
where $\epsilon = \beta/N$. You would then insert a complete basis of states, do some Gaussian integrals, and what you'll find is
$$
\langle q_f | e^{- \beta H } | q_i \rangle = \int_{q(0) = q_i}^{q(\beta) = q_f} \mathcal{D}q(\tau) e^{-S_E[q(\tau)]}.
$$
where
$$
S_E[q(\tau)] = \int_0^\beta ( \tfrac{m}{2} \dot q^2 + V(q) )d\tau.
$$
So the Lorentzian path integral formula and the Euclidean path integral formula require two different proofs! (Hopefully I have given you enough information to allow you to fill in all the details on your own.) The proofs use the same exact strategy, where you split up the time evolution operator into $N$ pieces an insert complete bases of states and do Gaussian integrals, but they are different proofs nonetheless. You can't derive the Euclidean path integral formula straight from the Lorentzian one, as far as I know. It drives me crazy how rarely this is explained.
Now, let me comment on a few other things. When we analytically continue, we must choose the variable(s) we continue from the real axis into the complex plane. We can see that the Lorentzian transition amplitude
$$
\langle q_f | e^{- i H T} | q_i \rangle
$$
and the Euclidean transition amplitude
$$
\langle q_f | e^{- \beta H} | q_i \rangle
$$
are actually related by an analytic continuation! If you have computed one of the two above quantities, you can get the other, simply using the relationship $\beta = i T$. However, you do not analytically continue the paths inside the path integral. In no way, shape, or form, do you take the function $q(t)$, and change it somehow into a function $q(\tau)$. In the Lorentzian path integral, $q(t)$ is a real function of a real variable. In the Euclidean path integral, $q(\tau)$ is also a real function of a real variable. These paths are unrelated. You don't have any expression like $q(\tau) = q(i t)$ or some other nonsense. Lorentzian paths and Euclidean paths really live in different spaces. They are dummy paths, or dummy variables, only appearing locked away inside of their own integrals. Only the parameters $T$ and $\beta$, which are external parameters of the integral, get analytically continued.
One final thing I want to mention is that, if we assume that all of the energy eigenvalues $E$ of $H$ are bounded from below, positive, and unbounded from above, then this analytic continuation of $T$ will only work in the lower half plane of the complex $T$ plane. This is because
$$
\langle q_f | e^{- i H T} | q_i \rangle = \sum_E \langle q_f | E\rangle e^{- i E T} \langle E | q_i \rangle.
$$
If $T$ has a positive imaginary part, this expression will blow up because the eigenvalues of $E$ are unbounded from above. If $T$ has a negative imaginary part, though, as in the case of $T = - i \beta$, then the factors $e^{- \beta E}$ will decay for large $E$ and the sum will converge.