6. Find the minimum value of the constant $\lambda$ such that for all positive integers $n$ and any positive real numbers $x_{k}(1 \leqslant k \leqslant n)$ whose sum is 1, we have
$$
\lambda \prod_{k=1}^{n}\left(1-x_{k}\right) \geqslant 1-\sum_{k=1}^{n} x_{k}^{2} .
$$
6. The minimum value of $\lambda$ is $e$.

For $n \geqslant 2$, take $x_{1}=x_{2}=\cdots=x_{n}=\frac{1}{n}$, then $\lambda \geqslant\left(1+\frac{1}{n-1}\right)^{n-1}$.
Notice that, $\lim _{n \rightarrow+\infty}\left(1+\frac{1}{n-1}\right)^{n-1}=\mathrm{e}$.
Thus, $\lambda \geqslant e$.
Furthermore, by the exponential inequality and the generalized Bernoulli inequality, we have
$$
\begin{array}{l}
\mathrm{e} \prod_{k=1}^{n}\left(1-x_{k}\right)=\prod_{k=1}^{n} \mathrm{e}^{x_{k}}\left(1-x_{k}\right) \\
\geqslant \prod_{k=1}^{n}\left(1+x_{k}\right)\left(1-x_{k}\right)=\prod_{k=1}^{n}\left(1-x_{k}^{2}\right) \\
\geqslant 1-\sum_{k=1}^{n} x_{k}^{2} .
\end{array}
$$

This shows that $\lambda=\mathrm{e}$ satisfies the condition.
In conclusion, the minimum value of $\lambda$ is $\mathrm{e}$.